1

I need to create a copy button to copy the text i previously inserted in a textbox, all this in excell

0

1 Answer 1

8

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.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.