ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically run macro when userform is opened (https://www.excelbanter.com/excel-programming/433815-automatically-run-macro-when-userform-opened.html)

jason

Automatically run macro when userform is opened
 
basically


sub userform_open()

call macro1

end sub


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

Rick Rothstein

Automatically run macro when userform is opened
 
Use the Initialize event...

Private Sub UserForm_Initialize()
Call Macro1
End Sub

--
Rick (MVP - Excel)


"jason" wrote in message
...
basically


sub userform_open()

call macro1

end sub


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



Patrick Molloy[_2_]

Automatically run macro when userform is opened
 
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.

"jason" wrote:

basically


sub userform_open()

call macro1

end sub


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



All times are GMT +1. The time now is 06:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com