Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I can't figure out how to prevent someone from clicking the close (X) icon on
a user form. I have a cancel button which is what I want them to have to use. thanks |
#2
![]() |
|||
|
|||
![]()
How about:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Beep 'msgbox "doesn't work" Cancel = True End If End Sub cwwolfdog wrote: I can't figure out how to prevent someone from clicking the close (X) icon on a user form. I have a cancel button which is what I want them to have to use. thanks -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
Thanks Dave,
Worked like a charm. "Dave Peterson" wrote: How about: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Beep 'msgbox "doesn't work" Cancel = True End If End Sub cwwolfdog wrote: I can't figure out how to prevent someone from clicking the close (X) icon on a user form. I have a cancel button which is what I want them to have to use. thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i set up multi page user form | Excel Discussion (Misc queries) | |||
user form | Excel Discussion (Misc queries) | |||
Data Entry Alert in User Form | Excel Discussion (Misc queries) | |||
Trying to delete form border, and it deletes all borders | Excel Discussion (Misc queries) | |||
A "previous" button on a user form | Excel Discussion (Misc queries) |