BeforeClose on a window?

Scotster

New Member
Joined
May 29, 2017
Messages
25
I have a board display using multiple windows within Excel spread across multiple monitors. During various events windows popup to show other information and when de-activated, the window is closed.


This works like a charm until someone closes the window to deactivate it, in which instance the next window also closes.


Is there a way during the WindowDeactivate subroutine I can check to see if the action to deactivate was to close it and thus ignore any further closing?
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

CalcSux78

Well-known Member
Joined
Oct 15, 2013
Messages
1,120
Maybe...

Code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then Cancel = True
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,099,029
Messages
5,466,116
Members
406,467
Latest member
bpat83

This Week's Hot Topics

Top