unload event and change to design mode

M

Mary

I have an unload event that prevents FormB from closing when FormA is open.

The unload event runs when anyone tries to close FormB, but it also runs
when I switch FormB to design mode.

Is there any way that I can prevent the unload event from triggering when I
switch from form view to design view?

Thanks.

Mary
 
A

Allen Browne

No. You can't prevent an event running.

Perhaps you could add a line like this to the General Declarations section
of a standard module:
Public Const bDebugMode = True

Then in the event you want to suppress:
If Not bDebugMode Then
Cancel = True
End If

Before you release the application, change the constant to False.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top