Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable the close "X" icon
I want to disable the close "X" icon on a workbook and worksheet. I have a
EXIT button on the worksheet aleady. Thanks for your help in advance! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable the close "X" icon
ToolsProtectionWorkbooks
Check the Window CheckBox Stefi €žAndy€ť ezt Ă*rta: I want to disable the close "X" icon on a workbook and worksheet. I have a EXIT button on the worksheet aleady. Thanks for your help in advance! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable the close "X" icon
name a cell 'GoodToClose and set its value to FALSE
your exit button code should set this to TRUE Add the following code to the code page of ThisWorkbook Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) Cancel = Not (ThisWorkbook.Names.Item("GoodToClose").RefersToRa nge = True) End Sub The Cancel variable will be true, thus preventing the workbook closing if the value of the range 'GoodToClose' is not set to TRUE Note: This will also prevent Excel itself from closing. "Andy" wrote: I want to disable the close "X" icon on a workbook and worksheet. I have a EXIT button on the worksheet aleady. Thanks for your help in advance! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable the close "X" icon
OK! Thanks again!
"Patrick Molloy" wrote: name a cell 'GoodToClose and set its value to FALSE your exit button code should set this to TRUE Add the following code to the code page of ThisWorkbook Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) Cancel = Not (ThisWorkbook.Names.Item("GoodToClose").RefersToRa nge = True) End Sub The Cancel variable will be true, thus preventing the workbook closing if the value of the range 'GoodToClose' is not set to TRUE Note: This will also prevent Excel itself from closing. "Andy" wrote: I want to disable the close "X" icon on a workbook and worksheet. I have a EXIT button on the worksheet aleady. Thanks for your help in advance! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable the close "X" icon
Stefi, thanks very much!
"Stefi" wrote: ToolsProtectionWorkbooks Check the Window CheckBox Stefi €žAndy€ť ezt Ă*rta: I want to disable the close "X" icon on a workbook and worksheet. I have a EXIT button on the worksheet aleady. Thanks for your help in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disable the "X" close button in an excel application | Excel Programming | |||
Disable the "X" close button in an excel application | Excel Programming | |||
Disable the "X" close button in an excel application | Excel Programming | |||
Disable Close "X" button on User Forms | Excel Programming | |||
Disable "Save" &/or "Close" | Excel Programming |