How do I make a button select and copy all the text in a textbox?

I need a button to select and copy all the text in "finalcode.Text", how can I make it do this?
neopetzrulezAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ShauliConnect With a Mentor Commented:
locate a command button on your fotm amd paste this code to its click event:

Private Sub Command1_Click()
Clipboard.Clear
finalcode.SelStart = 0
finalcode.SelLength = Len(finalcode.Text)
finalcode.SetFocus
Clipboard.SetText finalcode.Text, vbCFText
End Sub

S
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.