Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the userform's UserForm_QueryClose event set Cancel to 1:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then Cancel = 1 ''0 = "x" clicked. 1 = Unload Me End Sub Private Sub CommandButton1_Click() Unload Me End Sub -- Jim Rech Excel MVP "Esben " wrote in message ... | Hi | | Is it possible to disable the close button (the "X") on a userform? And | how? | | | --- | Message posted from http://www.ExcelForum.com/ | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW to close a userform using a button | Excel Discussion (Misc queries) | |||
Userform + close button | Excel Discussion (Misc queries) | |||
Use the X button on a userform | Excel Discussion (Misc queries) | |||
Userform Close button | Excel Programming | |||
UserForm Button Help | Excel Programming |