Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default SaveAs method

I am trying to automate a spreadsheet that uses DDE links to get data & save
it out to a comma delimited file to import into Access & would like this to
be seamless to the user (not having to respond to any messages).

I am using the SaveAs method in the BeforeClose event of the Workbook.
Actual code is:
ActiveWorkbook.SaveAs FileName:="e:\shift Report\report\xtest",
FileFormat:=xlCSVWindows

This code works fine & it saves this file, but after this happens & Excel is
being closed I get the standard message "File is not in Microsoft Excel 97
format. Would you like to save?" How can I bypass this message so the user
does not have respond to this message??


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default SaveAs method

Add the following code to the end of your macro that flags that the workbook does not need saving.

ActiveWorkbook.Saved = True

When the user closes the workbook, assuming no further changes have occurred, there should be no prompt for saving.


--

John Green - Excel MVP
Sydney
Australia


"L Buchy" wrote in message ...
I am trying to automate a spreadsheet that uses DDE links to get data & save
it out to a comma delimited file to import into Access & would like this to
be seamless to the user (not having to respond to any messages).

I am using the SaveAs method in the BeforeClose event of the Workbook.
Actual code is:
ActiveWorkbook.SaveAs FileName:="e:\shift Report\report\xtest",
FileFormat:=xlCSVWindows

This code works fine & it saves this file, but after this happens & Excel is
being closed I get the standard message "File is not in Microsoft Excel 97
format. Would you like to save?" How can I bypass this message so the user
does not have respond to this message??




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
Using SaveAs SarahN Excel Discussion (Misc queries) 3 May 14th 10 04:26 AM
Problem using SaveAs method Sujata Excel Discussion (Misc queries) 4 March 30th 10 07:21 AM
SaveAs method error Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 6th 09 09:05 PM
Please post this thread a correct full method, method about Nast Runsome New Users to Excel 8 February 25th 08 03:29 PM
Please post this thread a complete correct method, method about te Nast Runsome New Users to Excel 0 February 23rd 08 09:42 PM


All times are GMT +1. The time now is 07:37 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"