Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2014, 12:35 PM
JUST ME JUST ME is offline Run-time error 91 object variable or with block variable not set Windows 7 64bit Run-time error 91 object variable or with block variable not set Office 2010 32bit
Novice
Run-time error 91 object variable or with block variable not set
 
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
  #2  
Old 03-24-2014, 03:02 PM
macropod's Avatar
macropod macropod is offline Run-time error 91 object variable or with block variable not set Windows 7 32bit Run-time error 91 object variable or with block variable not set Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,721
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Have you moved the userform as well? If not, you'd probably need something like:
ActiveDocument.UserForm1.Show vbModeless
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-24-2014, 04:29 PM
macropod's Avatar
macropod macropod is offline Run-time error 91 object variable or with block variable not set Windows 7 32bit Run-time error 91 object variable or with block variable not set Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,721
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Cross-posted at: http://www.excelforum.com/word-progr...e-not-set.html
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 03-25-2014, 06:56 AM
JUST ME JUST ME is offline Run-time error 91 object variable or with block variable not set Windows 7 64bit Run-time error 91 object variable or with block variable not set Office 2010 32bit
Novice
Run-time error 91 object variable or with block variable not set
 
Join Date: Mar 2014
Posts: 3
JUST ME is on a distinguished road
Default

it was a cross post because there are 2 of us working on this project and I did not tell her I was posting for help. it was not done on purpose.
Reply With Quote
  #5  
Old 03-25-2014, 06:56 AM
JUST ME JUST ME is offline Run-time error 91 object variable or with block variable not set Windows 7 64bit Run-time error 91 object variable or with block variable not set Office 2010 32bit
Novice
Run-time error 91 object variable or with block variable not set
 
Join Date: Mar 2014
Posts: 3
JUST ME is on a distinguished road
Default

SOLVED: It was an error on my team mates part that made the error.
http://www.excelforum.com/word-programming-vba-macros/999121-run-time-error-91-object-variable-or-with-block-varialbe-not-set.html
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help sumif with variable for VBA jingo Excel Programming 4 01-23-2014 11:02 AM
Run-time error 91 object variable or with block variable not set object variable or with block variable not set MJP143 Excel 1 02-11-2013 05:07 AM
Run-time error 91 object variable or with block variable not set Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM
XML parsing & Object variable not set (Error 91) tinfanide Excel Programming 0 12-29-2011 08:43 AM
Variable fields? Emalee77 PowerPoint 0 01-30-2011 05:58 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 02:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft