Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

sub executed as the form loads

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
snaggy^^ - 21 Jan 2006 23:50 GMT
It's quite a stupid question...
how do i get to run a sub as the form loads?

smth like

sub myform_initialize()
or
sub myform_load()

but it doesn't work...
Tom Ogilvy - 21 Jan 2006 23:55 GMT
The initialize event is always named

Private Sub Userform_Initialize()

and you can use that to run your code.   It is always best to enter event
declarations by selecting them from the dropdowns at the top of the module.
Then you wouldn't have tried to use a name like  myfornm_initialize().
There is no Load event - that is what initialize is.

There is an Activate event.
Signature

Regards,
Tom Ogilvy

> It's quite a stupid question...
> how do i get to run a sub as the form loads?
[quoted text clipped - 6 lines]
>
> but it doesn't work...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.