Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Open problem 1

Status
Not open for further replies.

ribhead

Technical User
Jun 2, 2003
384
US
I recently got a different PC with Excel 2003 ( I think) and when I open a form that has an Auto_Open Sub the program stops and won't continue. I don't get an alarm or anything. Is there a setting that I need to change?

Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
Have you checked your macro security level ?
menu Tools -> Macro -> Security ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV it's medium

Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
I wrote another test program trying to show a form in Auto_Open and it does the same thing.
Both times the form pops up for a milisecond disapears then brings up the immediate window highlighting UserForm1.Show

?????????

Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
No error message ?
Have you checked the references ?
While in VBE, menu Tools -> References ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
What do I need a Reference to?

Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
I meant no MISSING reference ?
Did the project compile OK ?
while in VBE, menu Debug -> Compile VBAProject

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
P.H. Yes the project compiled O.K. My project always stops on UserForm.show I'm now plucking my left eyeball out.

Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
You haven't answer my 1st question: No error message ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PH Sorry, I stated it in my first post but no I'm not getting any error messages whatsoever.



Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
Workbook_Open is the preferred name of the Auto_Open sub these days. Auto_Open is still grandfathered in, but you won't find it in the on-line help.

If you make the Workbook_Open sub public (such as by removing the keyword Private), then you can run it without the inconvenience of opening the workbook. More importantly, you can step through your code a line at a time. To do this, click in the margin to the left of the instructions. This will put a big maroon dot there--and the code will stop executing at that point. You can then execute a line at a time with F8 or continue execution to the next stop with F5.

I've had trouble getting correct error messages when a fatal error occurs in the code pane behind a form. By stepping through the code a line at a time, I was finally able to identify the line of code that was throwing the error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top