Automatically run macro when userform is opened

  • Thread starter Thread starter jason
  • Start date Start date
J

jason

basically


sub userform_open()

call macro1

end sub


this is not correct but demonstrates what i am attempting to accomplish
 
Use the Initialize event...

Private Sub UserForm_Initialize()
Call Macro1
End Sub
 
are you trying to trap the userform opening or do you want the code run when
the userform opens?
For the latter you could use the form's initialise event

there's nothing else that I'm aware of, though I susoect that there's sopme
API that might work.
 

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