ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Red X close box (https://www.excelbanter.com/excel-programming/357982-red-x-close-box.html)

Gene Mills

Red X close box
 
I need to detect when a user clicks on the reb X box up in the right top
corner of the screen so I can block it from closing.
I thinkI have seen something about this some where but I just can't find it.
Any help would be a help.

oletrol



Spreadsheet Solutions

Red X close box
 
Gene;

Add this to the form's code.

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
End If
End Sub

--
Mark Rosenkrantz
---
Spreadsheet Solutions
Witkopeend 24
1423 SN
Uithoorn, Netherlands
---
E:
W:
www.rosenkrantz.nl


"Gene Mills" wrote in message
. ..
I need to detect when a user clicks on the reb X box up in the right top
corner of the screen so I can block it from closing.
I thinkI have seen something about this some where but I just can't find
it.
Any help would be a help.

oletrol





All times are GMT +1. The time now is 10:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com