After A Reinstall of Office, My Macros Get Multiple Errors
My friends,
I am suddenly getting many errors when I run my Macros. All my Macros used to work very well. I believe it is because my computer got a newer Microsoft Office 2016, but I cannot be certain because I don’t know what version I had before.
But I do know they had to reinstall Microsoft Office on my computer.
So, I had to paste all my Macros back in, I religiously keep backups in several different places. And it was sure a pain to make the Key Assignments again, about 50.
The first thing I thought of is some file that must be installed/clicked/enabled initially to make Macros/VBA work, MSForms?? I have a dim memory of that, but I forgot what it is or how to do it.
Thank you very much for any advice.
I will explain the errors:
Microsoft Visual Basic
Run-time error ‘424’:
Object required
And then, one line is highlighted in yellow:
Clipboard.SetText “John Doe” (only this line is highlighted in yellow)
Clipboard.PutInClipboard
Another Error:
Microsoft Visual Basic for Applications
Compile error:
User-defined type not defined
And then, one line is highlighted in blue:
Dim strTemp As String
Dim myData As DataObject (only this line is highlighted in blue)
Set mydata = New DataObject
Another Error:
Microsoft Visual Baic for Applications
Compile error:
User-defined type not defined
And then, one line is highlighted in blue:
'This part clears the clipboard
Dim clipboard As MSForms.DataObject (only this line is highlighted in blue)
Set clipboard = New MSForms.DataObject
clipboard.SetText ""
clipboard.PutInClipboard
|