I need to create a copy button to copy the text i previously inserted in a textbox, all this in excell
1 Answer
Consider you have a TextBox named TextBox1
and a CommandButton named CommandButton1
:
Private Sub CommandButton1_Click()
Dim MyData As New DataObject
MyData.SetText TextBox1.Text
MyData.PutInClipboard
End Sub
After clicking CommandButton1, the text on TextBox1 is ready to be pasted in any proper place.