PDA

View Full Version : Error showing userforms



outclassed
08-08-2007, 09:55 AM
Hi, sorry if this is a noob question, but Im having a problem displaying some userforms that I want to open when an excel file is open.

Anytime I show a userform in the Private Sub Workbook_Open() in ThisWorkbook I am automatically kicked to vba editor and everything starts up in debug mode with the yellow cursor on the call to show the userform.

These forms work fine when opened in the immediate box and this happens even when the userform is empty (just a default userform).

Do I just have some option on or something that is automatically kicking to debug mode?

If I try to step through the code I get this error

Run-Time error '400':
Application-defined or object-defined error


Thanks for reading, Drew.

rory
08-08-2007, 10:34 AM
What happens if you press f8 after you go into debug mode and the userform.show line is highlighted?

outclassed
08-08-2007, 11:40 AM
I get this error
Run-Time error '400':
Application-defined or object-defined error

It must be some setting or I messed something up somewhere because even older excel sheets taht were working fine last week get this problem also now.

rory
08-08-2007, 02:10 PM
Do you have any new add-ins installed? What settings do you have in the VBEditor under Tools->Options on the General tab for Error handling?