Microsoft KB Archive/96813

= Microsoft Knowledge Base =

Excel: SAVE Macro Command Saves File in Last Saved Format
Last reviewed: September 12, 1996

Article ID: Q96813

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a
 * Microsoft Excel for OS/2, versions 2.2, 3.0
 * Microsoft Excel for the Macintosh, versions 2.2, 3.0, 4.0

SUMMARY
In Microsoft Excel, there are minor differences between using the SAVE macro command and selecting Save from the File menu. The &quot;Microsoft Excel Function Reference&quot; guides for Microsoft Excel versions 3.0 and 4.0 do not accurately reflect these differences:

Page 368 of the &quot;Microsoft Excel Function Reference,&quot; for version 4.0 of Microsoft Excel, states that the SAVE command is  &quot;Equivalent to choosing the Save command from the File menu.&quot;

-and-

Page 203 of the &quot;Microsoft Excel Function Reference,&quot; for version 3.0 Microsoft Excel, states that the SAVE command is &quot;Equivalent to the File Save command.&quot; Neither of the above statements is entirely true. Using the SAVE macro function in a Microsoft Excel macro causes the active document to be saved in the same format in which it was last saved.

Workaround
To specify that you want to save the worksheet in the Normal format, use the SAVE.AS function and assign the type_num argument a value of 1, as in the following example:

SAVE.AS(,1)

MORE INFORMATION
If you run a macro that contains the SAVE command in Microsoft Excel version 4.0 when active worksheet is in the Microsoft Excel 2.1 file format, the worksheet will be saved in the Microsoft Excel 2.1 file format.

In contrast, if the worksheet is in the Microsoft Excel 2.1 file format and you choose Save from the File menu, a dialog box will appear asking you if you would like to update the file to Microsoft Excel 4.0 file format. (Choosing the Yes button in this dialog box will save the file in the Microsoft Excel Normal file format; if you choose the No button, the file will be saved in the format in which it was last saved--in the case of the above example, the file would be saved in the Microsoft Excel 2.1 file format.)

The following information describes what happens in each version of Microsoft Excel when you choose Save from the File menu.

Microsoft Excel Version 4.0
If you are working with a file that was last saved in the Normal (Microsoft Excel version 4.0) format, choosing Save from the File menu will result in the file being saved in that format without any dialog boxes or prompts being displayed.

If you are using a file that was saved in the Microsoft Excel version 3.0 format or Microsoft Excel 2.x format, a dialog box will be displayed with the following message:

'SheetName' was created in a previous version. Do you want to  update it to Microsoft Excel 4.0 format? To update the file to the Microsoft Excel 4.0 format, choose the Yes button or leave the file in its original format (choose the No button).

If the file is in any of the Lotus .WK3 formats, you will receive a dialog box stating the following:

Save 'SheetName.WK3' and all bound sheets? If you choose the Yes button, Microsoft Excel will display the Save As dialog box (you can change the file format and/or the filename in this dialog box). If you choose the No button, Microsoft Excel will cancel the Save operation (and nothing will be saved at this time).

If the file is in any other format, Microsoft Excel will display a Save As dialog box and you can change the file format and/or the filename as appropriate.

Microsoft Excel Version 3.0
If the file was last saved in the Normal (Microsoft Excel 3.0) format, choosing Save from the File menu will result in the file being saved in that format without any dialog boxes or prompts being displayed.

If the file is in the Microsoft Excel 2.x format, Microsoft Excel will display a Save As dialog box with the Normal (Microsoft Excel 3.0) file format already selected. You can save the file (in the Microsoft Excel 3.0 format) or change the file format back to the Microsoft Excel 2.1 format (choose the Options button and select the appropriate file format from the File Format dialog box).

If the file was last saved in any other format, Microsoft Excel will display a Save As dialog box and you can change the file format and/or the filename as desired.

Microsoft Excel Versions 2.x
If the file is in the Normal (Microsoft Excel 2.1) format or the SYLK format, when you choose Save from the File menu, the file will be saved in that format and no boxes or prompts will be displayed.

If the file is in any format other than the Normal or SYLK, Microsoft Excel will display a Save As dialog box and you can change the file format and/or the file name.