Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
App Close and File No Save
How can in VB say: Close Application and Don't Save File?
-- Thank you for your help in advance!!! (smile) Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
App Close and File No Save
Hi
ActiveWorkbook.Saved = True Application.Quit Try this -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Michael Kintner" wrote in message ... How can in VB say: Close Application and Don't Save File? -- Thank you for your help in advance!!! (smile) Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
App Close and File No Save
Ron,
I have found that this generally works to suppress the save warning that Excel generates when trying to close an unsaved sheet. I now have a situation where I want to delete an existing worksheet (from within my Add-In code), as follows: ActiveWorkbook.Saved = True ActiveWorkbook.Sheets("MySheet").Delete However, I have been unable to suppress the "Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete." warning message. I can't find anything in the knowledge base about this message. Any idea on how to suppress it? I don't want the user to even know that I'm deleting, and replacing, a worksheet. Thanks. Mark D'Agosta "Ron de Bruin" wrote in message ... Hi ActiveWorkbook.Saved = True Application.Quit Try this -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Michael Kintner" wrote in message ... How can in VB say: Close Application and Don't Save File? -- Thank you for your help in advance!!! (smile) Mike |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
App Close and File No Save
Yeap, got that one figured out.
Use: Application.DisplayAlerts = False ' delete the sheet Application.DisplayAlerts = True Mike "Mark D'Agosta" wrote in message et... Ron, I have found that this generally works to suppress the save warning that Excel generates when trying to close an unsaved sheet. I now have a situation where I want to delete an existing worksheet (from within my Add-In code), as follows: ActiveWorkbook.Saved = True ActiveWorkbook.Sheets("MySheet").Delete However, I have been unable to suppress the "Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete." warning message. I can't find anything in the knowledge base about this message. Any idea on how to suppress it? I don't want the user to even know that I'm deleting, and replacing, a worksheet. Thanks. Mark D'Agosta "Ron de Bruin" wrote in message ... Hi ActiveWorkbook.Saved = True Application.Quit Try this -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Michael Kintner" wrote in message ... How can in VB say: Close Application and Don't Save File? -- Thank you for your help in advance!!! (smile) Mike |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
App Close and File No Save
Yeap, got that one figured out.
Use: Application.DisplayAlerts = False ' delete the sheet Application.DisplayAlerts = True Mike "Mark D'Agosta" wrote in message et... Ron, I have found that this generally works to suppress the save warning that Excel generates when trying to close an unsaved sheet. I now have a situation where I want to delete an existing worksheet (from within my Add-In code), as follows: ActiveWorkbook.Saved = True ActiveWorkbook.Sheets("MySheet").Delete However, I have been unable to suppress the "Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete." warning message. I can't find anything in the knowledge base about this message. Any idea on how to suppress it? I don't want the user to even know that I'm deleting, and replacing, a worksheet. Thanks. Mark D'Agosta "Ron de Bruin" wrote in message ... Hi ActiveWorkbook.Saved = True Application.Quit Try this -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Michael Kintner" wrote in message ... How can in VB say: Close Application and Don't Save File? -- Thank you for your help in advance!!! (smile) Mike |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
App Close and File No Save
Thanks Mike. That did the trick.
Mark "Michael Kintner" wrote in message ... Yeap, got that one figured out. Use: Application.DisplayAlerts = False ' delete the sheet Application.DisplayAlerts = True Mike "Mark D'Agosta" wrote in message et... Ron, I have found that this generally works to suppress the save warning that Excel generates when trying to close an unsaved sheet. I now have a situation where I want to delete an existing worksheet (from within my Add-In code), as follows: ActiveWorkbook.Saved = True ActiveWorkbook.Sheets("MySheet").Delete However, I have been unable to suppress the "Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete." warning message. I can't find anything in the knowledge base about this message. Any idea on how to suppress it? I don't want the user to even know that I'm deleting, and replacing, a worksheet. Thanks. Mark D'Agosta "Ron de Bruin" wrote in message ... Hi ActiveWorkbook.Saved = True Application.Quit Try this -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Michael Kintner" wrote in message ... How can in VB say: Close Application and Don't Save File? -- Thank you for your help in advance!!! (smile) Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to save and close, then copy file | Excel Discussion (Misc queries) | |||
File close excel does not ask me to save changes | Excel Discussion (Misc queries) | |||
I can't save a file unless I close all excel instances or it's th. | Excel Discussion (Misc queries) | |||
Close file without Save Changes dialog box | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |