View Single Post
 
Old 03-24-2014, 12:35 PM
JUST ME JUST ME is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Mar 2014
Posts: 3
JUST ME is on a distinguished road
Unhappy Run-time error 91 object variable or with block variable not set

Hello all,

I am having trouble with Run-time error 91, I created the code in a document by it self it worked fine. once i moved it over to my actual project it gives me the run-time error 91 and i have spend hours trying to determine why it works when it's the only code in a document but not when i put in in my project with all the other codes. the error occures on "userform1.show vbmodeless. does anyone have any suggestions?

Code:
Private Sub Document_Open()
Application.WindowState = wdWindowStateMinimize
UserForm1.Show vbModeless
End Sub
Reply With Quote