Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form Close Button
Hi, Ive created a password form that activates on workbook open and i wan to disble the red cross in the top right corner of the form or chang the code to disble the form. can this be done, please help thank you all as always for your hel -- ceem ----------------------------------------------------------------------- ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065 View this thread: http://www.excelforum.com/showthread.php?threadid=47559 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form Close Button
Just add this to your userform's code module:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then Cancel = 1 End Sub When the X is clicked CloseMode is 0. But when you do an UnLoad Me CloseMode will be 1 so the form will close. -- Jim "ceemo" wrote in message ... | | Hi, | | Ive created a password form that activates on workbook open and i want | to disble the red cross in the top right corner of the form or change | the code to disble the form. | | can this be done, please help | | | thank you all as always for your help | | | -- | ceemo | ------------------------------------------------------------------------ | ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650 | View this thread: http://www.excelforum.com/showthread...hreadid=475594 | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form Close Button
Hi, take a look he- http://www.oaltd.co.uk/Excel/
"ceemo" wrote: Hi, Ive created a password form that activates on workbook open and i want to disble the red cross in the top right corner of the form or change the code to disble the form. can this be done, please help thank you all as always for your help -- ceemo ------------------------------------------------------------------------ ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650 View this thread: http://www.excelforum.com/showthread...hreadid=475594 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form Close Button
NoCloseButton.zip about 2/3rds down the page or perhape this code would help
(placed on your userform - Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) ' Prevents use of a Close/Cancel button If CloseMode = vbFormControlMenu Then MsgBox "Please select the CANCEL button.", , "" Cancel = True End If End Sub "bigwheel" wrote: Hi, take a look he- http://www.oaltd.co.uk/Excel/ "ceemo" wrote: Hi, Ive created a password form that activates on workbook open and i want to disble the red cross in the top right corner of the form or change the code to disble the form. can this be done, please help thank you all as always for your help -- ceemo ------------------------------------------------------------------------ ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650 View this thread: http://www.excelforum.com/showthread...hreadid=475594 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
close button does not close | Excel Discussion (Misc queries) | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel | |||
Form Close button | Excel Programming | |||
SIMPLEST way to disable "close" button on form? | Excel Programming |