--------------------------------------------------------
Private Sub Command1_Click()
Text1.Text = Clipboard.GetText
End Sub
-------------------------------------------------------
Remember to set the textbox multiline property to true if you want it to show multiple lines.
Since the clipboard can contain more than just text, I would change one thing in the code above. You need to check the format type before placing the clipboard data in the text box. Try this . . .
Code:
Private Sub Command1_Click()
If Clipboard.GetFormat(vbCFText) Then
Text1.Text = Clipboard.GetText
end if
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.