How can I find out (at run time) if some dialog is executing now

At run time I want to execute some dialog provided it isn’t now executing. How can I find out if it is executing already

How to check depends upon how the dialog was created. In your past questions I see one for a non-modal dialog. If the example provided was the basis for creation, then simply check the global variable used for a True condition (example was boolean field).

If you have created a non-modal dialog from scratch, the global variable would probably be an object. In this case you would check for a NULL condition.

So to check if it currently executing you would use something like:

If my_global_variable = True Then Exit Sub       'type boolean field'

or

If my_global_variable IS NOT NULL Then Exit Sub          'type object field'

If this answers your question please click on the :heavy_check_mark: (upper left area of answer).