Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable close button on all froms & MsgBoxes
Is there a way to disable/hide/something the close buttons in all userforms
and msgboxes in a workbook? If not can you individually disable/hide them in userforms? MsgBoxes? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable close button on all froms & MsgBoxes
On user forms try...
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True 'Chg msg text to fit your needs... MsgBox "Please use the ''OK'' Button.", vbInformation End If End Sub -- Thx MSweetG222 "Haxer" wrote: Is there a way to disable/hide/something the close buttons in all userforms and msgboxes in a workbook? If not can you individually disable/hide them in userforms? MsgBoxes? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable close button on all froms & MsgBoxes
Thank you...
Do you know if there is a way to globalize this so that I can put it in once and it will work for all userforms? "MSweetG222" wrote: On user forms try... Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True 'Chg msg text to fit your needs... MsgBox "Please use the ''OK'' Button.", vbInformation End If End Sub -- Thx MSweetG222 "Haxer" wrote: Is there a way to disable/hide/something the close buttons in all userforms and msgboxes in a workbook? If not can you individually disable/hide them in userforms? MsgBoxes? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disable Close Button | Excel Discussion (Misc queries) | |||
Disable the Close Window button of the worksheet | Excel Programming | |||
How to disable a sheet's x(close) button? | Excel Programming | |||
Disable Close X Button On Excel Application | Excel Programming | |||
Disable close button of Modeless Userform | Excel Programming |