Determine if a userform is loaded

  • What is the best way to determine whether a userform is loaded into memory?

    I have a macro that shows userform1 but I would like to have it determine if userform2 is loaded into memory but hidden and if so show it instead of userform1.

    thanks for any help

  • Re: Determine if a userform is loaded

    I don't know if this is the best way, but you can use a public variable to do this. When the form is loaded you set your variable for example to 1, then you can check if the form is loaded or not. When the form is unloaded you set the variable to 0.

  • Re: Determine if a userform is loaded

    Hi Gollem,

    thanks for the response. I did essentially the same thing using a trigger in the worksheet.

    thanks again

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!