• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1008
  • Last Modified:

Is it possible to pass an argument to Userform_Initialize() in VBA?


I'd like to pass an argument to the Userform1_Initialize() event when I call Userform1.show in VBA. Is it possible to do so? I know I could set a public variable and use this variable in my form but I'd like to know if I can do it as an argument passed to the event.

1 Solution
To pass a value into a procedure, you need to set the value of one of its parameters in the calling code, but we have no access to the calling side of built-in event procedures. Of course Initialise has no parameters anyway.
venmarcesAuthor Commented:
That's what I thought but I was hoping for a miracle...

Thanks GrahamSkan!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now