ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook.Save that also updates XL version? (https://www.excelbanter.com/excel-programming/408250-workbook-save-also-updates-xl-version.html)

Ed from AZ

Workbook.Save that also updates XL version?
 
A database query program outputs as an Excel 3/4 version file. When I
open in Excel, make any changes and save the file, I get the dialog
asking if I want to save in the latest version (I have XL 2003 on my
machine). I'm creating a macro to do most of the changes I normally
make to these files. Is there anything I can add to the Workbook.Save
at the end of ther routine to tell Excel to update the version? Or am
I stuck clicking OK every time I run this macro? (I thought of
SavesAs, but I don't want a new file - I just want this one saved.)

Ed

Bernie Deitrick

Workbook.Save that also updates XL version?
 
Ed,

The Save method defaults to the current application's workbook version.

You could use:

Application.DisplayAlerts = False
ThisWorkbook.SaveAs ThisWorkbook.FullName, FileFormat:=xlExcel4Workbook

Application.DisplayAlerts = True

HTH,
Bernie
MS Excel MVP


"Ed from AZ" wrote in message
...
A database query program outputs as an Excel 3/4 version file. When I
open in Excel, make any changes and save the file, I get the dialog
asking if I want to save in the latest version (I have XL 2003 on my
machine). I'm creating a macro to do most of the changes I normally
make to these files. Is there anything I can add to the Workbook.Save
at the end of ther routine to tell Excel to update the version? Or am
I stuck clicking OK every time I run this macro? (I thought of
SavesAs, but I don't want a new file - I just want this one saved.)

Ed




Ed from AZ

Workbook.Save that also updates XL version?
 
Thanks, Bernie. That's probably how I'll have to go. I want to SaveAs
an Excel 2003 file - what FileFormat do I use for that? I tried
MsgBox ActiveWorkbook.FileFormat and got -4143??

Ed

On Mar 24, 3:04*pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
Ed,

The Save method defaults to the current application's workbook version.

You could use:

Application.DisplayAlerts = False
ThisWorkbook.SaveAs ThisWorkbook.FullName, FileFormat:=xlExcel4Workbook

Application.DisplayAlerts = True

HTH,
Bernie
MS Excel MVP

"Ed from AZ" wrote in ...



A database query program outputs as an Excel 3/4 version file. *When I
open in Excel, make any changes and save the file, I get the dialog
asking if I want to save in the latest version (I have XL 2003 on my
machine). *I'm creating a macro to do most of the changes I normally
make to these files. *Is there anything I can add to the Workbook.Save
at the end of ther routine to tell Excel to update the version? *Or am
I stuck clicking OK every time I run this macro? *(I thought of
SavesAs, but I don't want a new file - I just want this one saved.)


Ed- Hide quoted text -


- Show quoted text -



Bernie Deitrick

Workbook.Save that also updates XL version?
 
Ed,

Using

FileFormat:=xlNormal

should save the file as the default file type for the Excel version.

HTH,
Bernie
MS Excel MVP


"Ed from AZ" wrote in message
...
Thanks, Bernie. That's probably how I'll have to go. I want to SaveAs
an Excel 2003 file - what FileFormat do I use for that? I tried
MsgBox ActiveWorkbook.FileFormat and got -4143??

Ed

On Mar 24, 3:04 pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
Ed,

The Save method defaults to the current application's workbook version.

You could use:

Application.DisplayAlerts = False
ThisWorkbook.SaveAs ThisWorkbook.FullName, FileFormat:=xlExcel4Workbook

Application.DisplayAlerts = True

HTH,
Bernie
MS Excel MVP

"Ed from AZ" wrote in
...



A database query program outputs as an Excel 3/4 version file. When I
open in Excel, make any changes and save the file, I get the dialog
asking if I want to save in the latest version (I have XL 2003 on my
machine). I'm creating a macro to do most of the changes I normally
make to these files. Is there anything I can add to the Workbook.Save
at the end of ther routine to tell Excel to update the version? Or am
I stuck clicking OK every time I run this macro? (I thought of
SavesAs, but I don't want a new file - I just want this one saved.)


Ed- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com