Make your own free website on Tripod.com

Copy And Paste Text Using The Clipboard

'Add 2 CommandButton and 2 TextBoxes To Your Form.
'When you press the first button, the text in the first TextBox will be copied to the clipboard.
'(You will be able to paste the text by clicking on the right mouse button and choosing 'Paste'.
'When you press the second button, the text you copied to the clipboard will be pasted to the
'second TextBox
'Insert the following code to your form:

Private Sub Command1_Click()
Clipboard.Clear
Clipboard.SetText Text1.Text
End Sub

Private Sub Command2_Click()
Text2.Text = Clipboard.GetText
End Sub

Go Back