Masta
New Member
- Joined
- Feb 22, 2022
- Messages
- 33
- Office Version
- 2021
- 2019
- 2016
- Platform
- Windows
Private Sub CommandButton13_Click()
With New MSForms.DataObject
.SetText TextBox13.Text
.PutInClipboard
End With
ActiveWindow.WindowState = xlMinimized
End Sub
I have a problem that I need help with. When I use the command and have some data in TextBox13 then I successfully copy that content and that's great, but when there is no content in TextBox13 and I use the command I get an error. How do I solve this problem?
With New MSForms.DataObject
.SetText TextBox13.Text
.PutInClipboard
End With
ActiveWindow.WindowState = xlMinimized
End Sub
I have a problem that I need help with. When I use the command and have some data in TextBox13 then I successfully copy that content and that's great, but when there is no content in TextBox13 and I use the command I get an error. How do I solve this problem?