unload event and change to design mode

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top