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