Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You mean the top right X?
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then msgbox "Don't use that X" cancel = true End If End Sub But I would think it would be much more standard to let the user click the X. If there's some code that needs to run if the user cancels, then have this routine call the BTNCancel_click procedure. dawall33 wrote: I need to keep the user from using the red x on a userform to close the form. I found several mentions of a controlbox property. It is not listed under the properties of the form. Where do I set this when the form is displayed? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Controlbox - Form Control - ActiveX | Excel Discussion (Misc queries) | |||
Runtime error 380 - Could not set the list property. Invalid property value. | Excel Programming | |||
Can I change a controlbox to a listbox on a Form | Excel Programming | |||
Runtime Error 380 – Could not set the list property. Invalid property value | Excel Programming | |||
Runtime error 380: Could not set the List property. invalid property value of listbox | Excel Programming |