Automatically run macro when userform is opened

J

jason

basically


sub userform_open()

call macro1

end sub


this is not correct but demonstrates what i am attempting to accomplish
 
R

Rick Rothstein

Use the Initialize event...

Private Sub UserForm_Initialize()
Call Macro1
End Sub
 
P

Patrick Molloy

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