Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Taking out the 'Close Button' in the top right hand corner of dialog boxes


In VBA, is there any way of removing the little X buttons off the dialog
boxes top right hand corner??


--
pspyve
------------------------------------------------------------------------
pspyve's Profile: http://www.excelforum.com/member.php...o&userid=30656
View this thread: http://www.excelforum.com/showthread...hreadid=503180

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Taking out the 'Close Button' in the top right hand corner of dialog boxes

p,

Do you mean dialog box or do you mean userform?
If a userform then look at the QueryClose event for the form.
You can use that to prevent the form from closing.

Jim Cone
San Francisco, USA


"pspyve"
wrote in message
In VBA, is there any way of removing the little X buttons off the dialog
boxes top right hand corner??
pspyve

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Taking out the 'Close Button' in the top right hand corner of dialog boxes

Hi
This won't remove it, but it will disable it

'Sub suggested in Green, page190
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
Application.EnableEvents = False
If CloseMode = vbFormControlMenu Then
MsgBox "Please use only the Cancel button", vbCritical, "This
cancel is disabled"
Cancel = True
End If
Application.EnableEvents = True
End Sub

regards
Paul

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Taking out the 'Close Button' in the top right hand corner of dialog boxes


I know there was an API that removed it - using 97 - and probably would
work for later versions but not something I would recommend unlessyou
know what you are doing. and really need to do this

I am away from home and haven't got the code on me.


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=503180

Reply
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
The 'X' in the upper right hand corner is suddenly dithered? Help Vicki P Excel Discussion (Misc queries) 3 May 13th 06 12:41 AM
Auto close the prompt & dialog boxes HelpEachOther Excel Programming 2 December 21st 05 02:51 AM
Automatically Close Dialog Boxes chriskane Excel Worksheet Functions 2 August 9th 05 12:14 PM
what is this object called? - right hand corner of statusbar Squid[_3_] Excel Programming 7 February 15th 04 10:57 PM


All times are GMT +1. The time now is 07:46 AM.

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

About Us

"It's about Microsoft Excel"