When I have something on my clipboard, and I have a change event macro that runs, I'd like to be able to trap what's in the clipboard at the start of the macro executing, then when the macro is complete, put it back in the clipboard. Otherwise, if I copy and paste before my macro executes, my clipboard automatically clears when the change macro runs, and I can't copy multiple times from clipboard.
I've tried inserting this code into my change event, but I get a "Compile error: user-defined type not defined" error every time.
Dim Clipboard As MSForms.DataObject
Set Clipboard = New MSForms.DataObject
Clipboard.GetFromClipboard
Clipboard.PutInClipboard
I've tried DIMing as just a DataObject, or even just an Object, but still the same error.