How can I check that if the form is already open?

  • Thread starter Thread starter Shelby
  • Start date Start date
S

Shelby

Hi,
how can I check that if the form is already open?
Whenever I click on a button, it will open the form.
I would like to check if the form is open.
 
Assume that the form that you want to check on is Form2. In the Click
event of the button (on Form1)

If Form2 Is Nothing OrElse Not Form2.Loaded Then Form2.Load

HTH

David
 
Shelby,

I prefer it to disable the button when a form is opened and when it is
closed to enable the button again.

Cor
 
Back
Top