Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
turn off 'save' prompt when closing Excel Dawnyanne Excel Worksheet Functions 2 September 18th 07 12:26 PM
Prompt to save on closing Jake Excel Discussion (Misc queries) 7 October 4th 05 12:05 AM
how to disable save prompt on closing excel file in automated mode [email protected] Excel Discussion (Misc queries) 3 July 6th 05 10:35 PM
Excel 2003 does not prompt to save changes when closing? Johnewally Excel Discussion (Misc queries) 1 March 17th 05 06:41 PM
Save? prompt when closing Excel MC Excel Discussion (Misc queries) 4 March 12th 05 10:55 PM


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"