PC Review


Reply
Thread Tools Rate Thread

Disable close button on all froms & MsgBoxes

 
 
=?Utf-8?B?SGF4ZXI=?=
Guest
Posts: n/a
 
      3rd Aug 2007
Is there a way to disable/hide/something the close buttons in all userforms
and msgboxes in a workbook? If not can you individually disable/hide them in
userforms? MsgBoxes?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TVN3ZWV0RzIyMg==?=
Guest
Posts: n/a
 
      5th Aug 2007
On user forms try...

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
'Chg msg text to fit your needs...
MsgBox "Please use the ''OK'' Button.", vbInformation
End If
End Sub


--
Thx
MSweetG222



"Haxer" wrote:

> Is there a way to disable/hide/something the close buttons in all userforms
> and msgboxes in a workbook? If not can you individually disable/hide them in
> userforms? MsgBoxes?

 
Reply With Quote
 
=?Utf-8?B?SGF4ZXI=?=
Guest
Posts: n/a
 
      9th Aug 2007
Thank you...
Do you know if there is a way to globalize this so that I can put it in once
and it will work for all userforms?

"MSweetG222" wrote:

> On user forms try...
>
> Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
> If CloseMode = vbFormControlMenu Then
> Cancel = True
> 'Chg msg text to fit your needs...
> MsgBox "Please use the ''OK'' Button.", vbInformation
> End If
> End Sub
>
>
> --
> Thx
> MSweetG222
>
>
>
> "Haxer" wrote:
>
> > Is there a way to disable/hide/something the close buttons in all userforms
> > and msgboxes in a workbook? If not can you individually disable/hide them in
> > userforms? MsgBoxes?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Close(X) button =?Utf-8?B?RGFuIERlQ291cnNleQ==?= Windows XP Customization 1 19th Oct 2007 05:45 PM
Disable Close button and remove Close menu and then reactivate fpsoft Microsoft Dot NET Framework Forms 0 23rd Sep 2007 03:55 PM
disable close button =?Utf-8?B?TWlrZSBUb2Rk?= Windows XP General 5 24th Feb 2005 12:33 PM
Disable Close Button NuBBeR Microsoft C# .NET 1 29th Sep 2004 05:02 PM
disable 'Close Button' Chambonneau Windows XP Internet Explorer 0 5th Jul 2004 03:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:06 PM.