Multiple Userform Macro Headache
Hello all,
This is my first time posting to this group, so I'm sorry if I
(unintentionally) don't follow proper conventions.
My problem is with creating a macro that utilizes multiple userforms.
Of course, this means that each userform has its own name, own code,
etc. The problem lies with the Userform_Initialize() event. If I use
this code:
PartsFindForm.Show 'where PartsFindForm is the name of the userform
Userform_Initialize() gives me an error and Excel refuses to run until
I change the name to PartsFindForm_Initialize(). Of course, Excel then
no longer recognizes this as an event and skips any code inside the
Sub. What should I do to make this work? As of now I am running
everything with the Userform_Activate() event which works perfectly
(like Initialize() should) with the problem that code that I only want
running once gets run multiple times. This error also occurs with Load,
Hide, and any other Userform specific commands.
Any help would be greatly appreciated! Thank you.
-Larry
|