Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ligaya,
Place this code in the UserForm: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) ' Disable the "X" on the userform so that the user can't ' dismiss the userform by clicking on the "X" in the upper ' right hand corner of the userform If CloseMode = vbFormControlMenu Then Cancel = True MsgBox Prompt:="Please use the buttons on the" & vbCrLf & _ " Form to Close it" End If End Sub Note that the user could still use Ctrl + Break to get rid of the form (and stop your macros) John Ligaya wrote: I am developing a user form in which I do not want the close (x) button. When I insert a new userform, this x button is already there. Is there a way I could disable this close button? Really appreciate if any one there could help me. Thanks. Ligaya |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA userform | Excel Worksheet Functions | |||
userform | New Users to Excel | |||
Userform Help in VBC | Excel Discussion (Misc queries) | |||
UserForm Help | Excel Discussion (Misc queries) | |||
UserForm | Excel Programming |