I must admit, I omitted some lines of code in my original posting
for the sake of trying to keep my explanation as brief and easy
to understand as possible. Sorry bout that!
What I didnt explain earlier was that I actually have 2 userforms
in my project, Userform1 and Userform2. Userform1 has a
command button named ButtonA and Userform2 has a command
button named ButtonB.
There is also a pushbutton on my Sheet1 (named Button1) that
when pressed it will load Userform1.
Additionally, if a user presses ButtonA on top of Userform1,
I wanted to unload Userform1 and replace it with Userform2.
I think I have just identified my problem. If Userform1 gets
swapped out with Userform2, then a user presses Button1
on my spreadsheet, it will see that Userform1 is unloaded, so
it will reload it again, hence Userform1 and Userform2 will be
on the screen at the same time. I know that's confusing, but
I think I just solved my own problem, haha.
BTW, thanks for all your great help Rick!
"Rick Rothstein" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> No, that is not what I meant, but that is not your fault, it is mine for
> forgetting how you implemented your special modeless implementation. I had
> tested UserForm1.Show when I made my initial response to you and then
> forgot about it when I last responded to you. Let me start over. Since you
> use the Initialize event to create your special form, then that code will
> only be executed the first time the form is loaded... just showing the
> form does not trigger the Initialize event... only loading or showing it
> for the first time does that, so I don't see why you are getting multiple
> instances of your UserForm. Show me **all** the code in your button's
> procedure that loads/shows your UserForm.
>
> --
> Rick (MVP - Excel)
>
|