Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable Close "X" button on User Forms


Hope someone can help.

I have created a userform as a navigation menu for a very large
spreadsheet.
This Userform is sized to full screen, and all control buttons on the
User form lead to other full screen User forms.
The spreadsheet sheets simply operate and collate information entered
into the User forms in the background.

To ensure that the Userforms cannot be closed to give easy visible
access to the spreadsheet below, I would like to be able to disable the
"X" close button on the user form.

Is this possible.

Thanks for any help you can give.

Celtic_Avenger


--
Celtic_Avenger
------------------------------------------------------------------------
Celtic_Avenger's Profile: http://www.excelforum.com/member.php...o&userid=14101
View this thread: http://www.excelforum.com/showthread...hreadid=268222

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disable Close "X" button on User Forms

Hi Celtic

You can use this event in the userform module

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode < vbFormCode Then
MsgBox "Use the Close button to close the form.", _
vbOKOnly, "yourprogramname"
Cancel = True
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Celtic_Avenger" wrote in message ...

Hope someone can help.

I have created a userform as a navigation menu for a very large
spreadsheet.
This Userform is sized to full screen, and all control buttons on the
User form lead to other full screen User forms.
The spreadsheet sheets simply operate and collate information entered
into the User forms in the background.

To ensure that the Userforms cannot be closed to give easy visible
access to the spreadsheet below, I would like to be able to disable the
"X" close button on the user form.

Is this possible.

Thanks for any help you can give.

Celtic_Avenger


--
Celtic_Avenger
------------------------------------------------------------------------
Celtic_Avenger's Profile: http://www.excelforum.com/member.php...o&userid=14101
View this thread: http://www.excelforum.com/showthread...hreadid=268222



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Disable Close "X" button on User Forms

Hi,
Here is the (pasted) example from the Excel VBA Help file

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'Prevent user from closing with the Close box in the title bar.
If CloseMode < 1 Then Cancel = 1
UserForm1.Caption = "The Close box won't work! Click me!"
End Sub
Jorge
"Celtic_Avenger" escreveu na
mensagem ...

Hope someone can help.

I have created a userform as a navigation menu for a very large
spreadsheet.
This Userform is sized to full screen, and all control buttons on the
User form lead to other full screen User forms.
The spreadsheet sheets simply operate and collate information entered
into the User forms in the background.

To ensure that the Userforms cannot be closed to give easy visible
access to the spreadsheet below, I would like to be able to disable the
"X" close button on the user form.

Is this possible.

Thanks for any help you can give.

Celtic_Avenger


--
Celtic_Avenger
------------------------------------------------------------------------
Celtic_Avenger's Profile:

http://www.excelforum.com/member.php...o&userid=14101
View this thread: http://www.excelforum.com/showthread...hreadid=268222



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
Disable "save" option on close. PG Excel Discussion (Misc queries) 2 September 6th 06 12:15 AM
Folder Graphic (in Word & Pub) instead of "Close" button in Excel Susan ARC Excel Discussion (Misc queries) 1 September 3rd 06 04:34 AM
DISABLE CLOSE MSGBOX ON CLICK "X" sal21[_34_] Excel Programming 1 September 24th 04 03:38 PM
Disable "Save" &/or "Close" universal[_4_] Excel Programming 3 October 25th 03 12:38 PM
SIMPLEST way to disable "close" button on form? codytheretriever Excel Programming 4 August 7th 03 09:00 PM


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

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"