Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel - no save prompt
Hi
I'm automating Excel from VB, populating a sheet and then showing the user. The user may or may not make chnages to this sheet. When the user closes Excel, the user is not prompted to save changes, but rather Excel closes down without asking. Is there a flag or something I can set to force Excel to prompt for save changes if any changes have occurred to this sheet. Thanks Simon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel - no save prompt
Excel should prompt to save. To test that I ran this script (copy and save
as a VBS file): Dim XL Set XL = CreateObject("Excel.Application") XL.Workbooks.Add XL.Activesheet.Range("A1").Value = "x" XL.Visible = True Quiting Excel without doing a thing I got a save prompt. -- Jim "Simon Woods" wrote in message ... | Hi | | I'm automating Excel from VB, populating a sheet and then showing the user. | The user may or may not make chnages to this sheet. When the user closes | Excel, the user is not prompted to save changes, but rather Excel closes | down without asking. Is there a flag or something I can set to force Excel | to prompt for save changes if any changes have occurred to this sheet. | | Thanks | | Simon | | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel - no save prompt
Simon Woods wrote: Hi I'm automating Excel from VB, populating a sheet and then showing the user. The user may or may not make chnages to this sheet. When the user closes Excel, the user is not prompted to save changes, but rather Excel closes down without asking. Is there a flag or something I can set to force Excel to prompt for save changes if any changes have occurred to this sheet. Thanks Simon Hi Simon, My guess is that either your code (or maybe some other code in the workbook you are opening) is setting Excel's display alerts property equal to false. To test this, maybe include the fragment "msgbox ExcelApp.DisplayAlerts" (if your application variable is ExcelApp) in your script and see if it gives False. If so, including ExcelApp.DisplayAlerts = True should fix the problem. Hope that helps, -John Coleman |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel - no save prompt
"John Coleman" wrote in message ups.com... Simon Woods wrote: Hi I'm automating Excel from VB, populating a sheet and then showing the user. The user may or may not make chnages to this sheet. When the user closes Excel, the user is not prompted to save changes, but rather Excel closes down without asking. Is there a flag or something I can set to force Excel to prompt for save changes if any changes have occurred to this sheet. Thanks Simon Hi Simon, My guess is that either your code (or maybe some other code in the workbook you are opening) is setting Excel's display alerts property equal to false. To test this, maybe include the fragment "msgbox ExcelApp.DisplayAlerts" (if your application variable is ExcelApp) in your script and see if it gives False. If so, including ExcelApp.DisplayAlerts = True should fix the problem. Yep - you're right. I stopped alerts when populating the sheet and forgot to switch it back on Thanks Simon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
turn off 'save' prompt when closing Excel | Excel Worksheet Functions | |||
Prompt to save on closing | Excel Discussion (Misc queries) | |||
how to disable save prompt on closing excel file in automated mode | Excel Discussion (Misc queries) | |||
Excel 2003 does not prompt to save changes when closing? | Excel Discussion (Misc queries) | |||
Save? prompt when closing Excel | Excel Discussion (Misc queries) |