Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable save as dialog box
I have a workbook where I disabled all menu items, and the only way to exit
is by choosing the "x" in the upper right corner. I have some code to disable the "save as" dialog box, that I think used to work, but for some reason, now does not. In the "This Workbook" object I have: Private Sub Workbook_BeforeClose(Cancel As Boolean) Workbooks("Urizen.xls").Saved = True End Sub I tried adding application.displayalerts=false and this did not work either. What am I missing? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable save as dialog box
Events must be enabled for your code to work.
Run this and see if things get better ... Sub FixThings Application.EnableEvents = True End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Dion" wrote in message I have a workbook where I disabled all menu items, and the only way to exit is by choosing the "x" in the upper right corner. I have some code to disable the "save as" dialog box, that I think used to work, but for some reason, now does not. In the "This Workbook" object I have: Private Sub Workbook_BeforeClose(Cancel As Boolean) Workbooks("Urizen.xls").Saved = True End Sub I tried adding application.displayalerts=false and this did not work either. What am I missing? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable save as dialog box
You could also insert this procedu
Sub Auto_Close() ThisWorkbook.Save ThisWorkbook.Close End Sub -- Best wishes, Jim "Jim Cone" wrote: Events must be enabled for your code to work. Run this and see if things get better ... Sub FixThings Application.EnableEvents = True End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Dion" wrote in message I have a workbook where I disabled all menu items, and the only way to exit is by choosing the "x" in the upper right corner. I have some code to disable the "save as" dialog box, that I think used to work, but for some reason, now does not. In the "This Workbook" object I have: Private Sub Workbook_BeforeClose(Cancel As Boolean) Workbooks("Urizen.xls").Saved = True End Sub I tried adding application.displayalerts=false and this did not work either. What am I missing? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disable save, save as, but allow save via command button | Excel Programming | |||
how to get disk icon on save button of save as dialog like 2000 | Excel Discussion (Misc queries) | |||
How do you disable save file dialog? | Setting up and Configuration of Excel | |||
Disable Saveas Dialog | Excel Programming | |||
Disable Save As dialog on ReadOnly spreadsheet | Excel Programming |