ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DISABLE CLOSE MSGBOX ON CLICK "X" (https://www.excelbanter.com/excel-programming/311334-disable-close-msgbox-click-x.html)

sal21[_34_]

DISABLE CLOSE MSGBOX ON CLICK "X"
 

How to disable the close option with "X" in a msgbox

--
sal2

-----------------------------------------------------------------------
sal21's Profile: http://www.excelforum.com/member.php...nfo&userid=204
View this thread: http://www.excelforum.com/showthread.php?threadid=26318


Tim[_39_]

DISABLE CLOSE MSGBOX ON CLICK "X"
 

"sal21" wrote in message
...

How to disable the close option with "X" in a msgbox?


the following works for a userform... not sure if it would work for a
msgbox: -

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

hth,

tim




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

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