Dear Forum,
I'm trying to make an ActiveX Button that upon click will copy all content from an ActiveX Textbox to CLIPBOARD.
I managed to go through some code snippets but I can't get it to run.
Upon hitting ctrl + v I'm pasting strange symbols like this:
The code I am using is the following:
Private Sub CommandButton1_Click()
With New MSForms.DataObject
'Put a string in the clipboard
.SetText TextBox1.Text 'Textbox1
.PutInClipboard
'Get a string from the clipboard
.GetFromClipboard
Debug.Print .GetText
End With
End Sub
Any feedback would be strongly appreciated!
Kind regards!
Bookmarks