LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Form with no Cancel option

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 option buttons, okay, cancel, NEED the form to stay up Janis Excel Programming 2 September 1st 06 06:43 PM
Disabling 'Cancel' option when saving work (Yes/No/Cancel) [email protected] Excel Programming 0 July 11th 06 09:28 PM
problems with a form and a cancel button filo666 Excel Programming 1 April 13th 05 01:01 AM
Cancel option possible while opening a file? aiyer[_56_] Excel Programming 1 August 31st 04 10:33 PM
Option to continue or cancel Ken G[_2_] Excel Programming 3 June 7th 04 04:13 AM


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"