I have the following snippet of my code where the On Error Resume Next is not working if the user inadvertently copies an image into the clipboard.
I just get the error message: Run-time error '-2147221404 (80040064)': DataObject:GetText Invalid FORMATETC structure
I just need to be able to skip the error but can't seem to find an answer if anyone can help please.
Dim dataObj As MSForms.DataObject
Dim strPaste As string
Set dataObj = New MSForms.DataObject
dataObj.GetFromClipboard
On Error Resume Next
strPaste = dataObj.GetText
Bookmarks