sub executed as the form loads

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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...
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top