How can I call UserForm_Initialize()
in a Module
instead of the UserForm code object?
Create Button to open UserForm In the centre of the worksheet, draw a rectangle, and format as desired. Go to the Excel window, and click the button, to open the UserForm.
From a module:
UserFormName.UserForm_Initialize
Just make sure that in your userform, you update the sub like so:
Public Sub UserForm_Initialize()
so it can be called from outside the form.
Alternately, if the Userform hasn't been loaded:
UserFormName.Show
will end up calling UserForm_Initialize
because it loads the form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With