Fred Wayne
Member
Hello. Perhaps my question would sound kind of weird. I want to know why I get an error when I use the copy/paste VBA COde. For example...
At the beginning it works perfectly and amazing. But for some reason, i don´t know why, it stops working and the paste does not work. Instead of pasting what I want, it only pastes a couple of squares: ""
After rebooting the PC, enter again to excel and it works perfectly. but after a while it stops pasting what I need and the squares come back. Am I doing something wrong? Is there a failure that can be fixed? What can I do in this case because I can be rebooting my PC at all times.
Thank you in advance.
Code:
Private Sub CommandButton3_Click()
Set MyData = New DataObject
MyData.SetText Label2.Caption
MyData.PutInClipboard
Unload Me
End Sub
At the beginning it works perfectly and amazing. But for some reason, i don´t know why, it stops working and the paste does not work. Instead of pasting what I want, it only pastes a couple of squares: ""
After rebooting the PC, enter again to excel and it works perfectly. but after a while it stops pasting what I need and the squares come back. Am I doing something wrong? Is there a failure that can be fixed? What can I do in this case because I can be rebooting my PC at all times.
Thank you in advance.
Last edited by a moderator: