Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hoi Peter,
Thank you very much for your answer ans the links. Regards, Anne "Peter T" <peter_t@discussions wrote in message ... The call to the FindWindow API finds the window handle of your userform, with the search filtered to the 'classname' of Userforms (ThunderDFrame in VBA offiice 2000+), and the form's caption. Calls to API's GetSystemMenu and RemoveMenu are detailed in the following links - http://msdn2.microsoft.com/en-us/library/ms647985.aspx http://msdn2.microsoft.com/en-us/library/ms647994.aspx The constant SC_CLOSE is so named by convention, but could be named anything, or simply the value &HF060& or 61536& could be passed to identify in particular it's the close button to be removed (or greyed). Regards, Peter T "Anne Schouten" wrote in message ... Thank you all. The query_Close method works perfect. The option to disable the X-button works aswel, but I don't understand the code. Can you tell me where to find explanation for it. Anne "Anne Schouten" wrote in message ... I made an Excelform. If a user closes the form with the X-button (Cancel) at the top righthand corner, other macro's will give problems, so I dont want the form to be closed with this button. In Access you can hide this button, but so far I can see that is not possible in Excel. How can I prevent that the user uses this Cancelbutton? Anne |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
3 option buttons, okay, cancel, NEED the form to stay up | Excel Programming | |||
Disabling 'Cancel' option when saving work (Yes/No/Cancel) | Excel Programming | |||
problems with a form and a cancel button | Excel Programming | |||
Cancel option possible while opening a file? | Excel Programming | |||
Option to continue or cancel | Excel Programming |