Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
How can I disable the X (close button) on a userform, or hide it all together manythanks Johny5 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Disable: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then Cancel = True End Sub I think Hide is a part of FormFun. It's far more complex: http://www.oaltd.co.uk/Excel/Default.htm HTH. Best wishes Harald skrev i melding oups.com... Hi all, How can I disable the X (close button) on a userform, or hide it all together manythanks Johny5 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rather than disable it, have it call the cancel button's code. That's what users
expect it will do, right? Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then Cancel = True btnCancel_Click End If End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Harald Staff wrote: Hi Disable: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then Cancel = True End Sub I think Hide is a part of FormFun. It's far more complex: http://www.oaltd.co.uk/Excel/Default.htm HTH. Best wishes Harald skrev i melding oups.com... Hi all, How can I disable the X (close button) on a userform, or hide it all together manythanks Johny5 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to get deep.. <g
My experience is that when the X is clicked, it means "this is not what I expected to see. i don't know or care what this is, but i'm sure it's useless to me now. make it go away". Which may or may not be the same as Cancel, depending on what Cancel does. Probably the same thing most of the times, so you're right. Best wishes Harald "Jon Peltier" skrev i melding ... Rather than disable it, have it call the cancel button's code. That's what users expect it will do, right? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable Exit button on a UserForm | Excel Discussion (Misc queries) | |||
How to disable the Exit Button of UserForm in Excel? | Excel Programming | |||
disable or hide the close window icon 'X' in the corner of a userform | Excel Programming | |||
Disable Button | Excel Programming | |||
Disable close button of Modeless Userform | Excel Programming |