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

code running on open of a form 1

Status
Not open for further replies.

brightstar

Technical User
Sep 20, 2002
233
Quick question.
How or at what point can i insert code into a form so that it runs only when the form has opened and become visible.
 
I use Activated Event and a module level boolean indicator to know that it is the first time.

if not mblnInitialized then
....one time code
mblnInitialized = true
End if Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
you can also use the form's on load-function or put it in the construct (public sub new()).

/icca
 
i ended up using a timer to get the job done. I tried using the activate event but it ran over and over. nice idea on the boolean. i'll get it sorted with that im sure. cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top