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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load a form without running form initialize event??

Status
Not open for further replies.

Jooky68

Programmer
Jul 10, 2002
231
0
0
US
Is there a way to open up a form without the form load (or initialize ) event procedure activating? I want to skip it depending on how the user is activating the form. Thanks in advance.
 
Put the code into another procedure and stick an if/then/else into the autorun procedure. That should test whether a variable has got a certain value, for example.

All the best,

Carol, Berlin :)
 
depending on how it is being invoked, it could be simply a case of using
Application.enableevents = false
depending on a condition or, testing a boolean variable:

Public FormOpenFromButton as boolean

In the form initialise event, use

IF FormOpenFromButton = FALSE then exit sub
Other code in initialise event goes here. This will mean the event will fire but if the boolean value is FALSE, it will skip all the code in there


Rgds, Geoff
Si hoc legere scis, nimis eruditionis habes
Want the best answers to your questions ? - then read me baby one more time - faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top