CodeItBetter Programming Another VB Programming Blog

How to copy/cut the content of the text box to the clipboard

Posted on January 21, 2012
1
2
3
4
5
6
7
8
9
10
'Coding Basics - How to copy/cut the content of the text box to the clipboard
Sub cmdCopy_Click()
    Clipboard.SetText Text1.SelText 'Copies only selected text
    'Clipboard.SetText Text1.Text 'Copies whole TextBox content
End Sub
 
Private Sub cmdCut_Click()
    Clipboard.SetText Text1.SelText
    Text1.SelText = ""
End Sub
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.