-
I want to have a command button do the following:
Text1.SetFocus
SendKeys ("^A")
SendKeys ("^C")
See I need it to highlight Text1.Text and then copy it to the clipboard all in one command button press.
Your help will be greatly appreciated,
Daniel Christie
-
You can do it without SendKeys.
Code:
Private Sub Command1_Click()
Text1.SelLength = Len(Text1.Text)
Text1.SetFocus
Clipboard.SetText Text1.SelText
End Sub
'Or:
Private Sub Command1_Click()
Clipboard.SetText Text1.Text
End Sub
-
Thanks
Thankyou Matthew, much appreciated.