Macro to Save in the Excel 2.1 Format

Last reviewed: November 2, 1994
Article ID: Q73884
The information in this article applies to:
  • Microsoft Excel for Windows, version 3.0
  • Microsoft Excel for OS/2, version 3.0

SUMMARY

Microsoft Excel 3.0 will always try to save a document in the Microsoft Excel 3.0 format. If you choose Save As from the File menu and choose Options, Normal is displayed in the File Format list box. Normal is the Microsoft Excel 3.0 format. To save in the Microsoft Excel 2.1 format, select Excel 2.1 from the File Format list box. You can also use a macro to save a version 3.0 document in the Excel 2.1 format. Use the SAVE.AS and SEND.KEYS macro commands (see examples 1 and 2 below).

MORE INFORMATION

The following examples demonstrate the proper syntax for writing a macro to save documents in the Excel 2.1 format. To use these examples, you should be familiar with creating, defining, and running command macros.

Example 1

The following command macro saves a spreadsheet with the name "TEST.XLS" to the Excel 2.1 format (16 designates this):

   =SAVE.AS("TEST.XLS",16)

Example 2

If you are sending the command via DDE (dynamic data exchange), the following macro command will execute the same process:

   =SEND.KEYS("%OE~")+SAVE.AS?()

The "%" is equivalent to pressing ALT+O to select the Options button in the Save As menu. "E" selects the Excel 2.1 option in the File Format list box.

The macro from example 1 fails when using DDE because the number 16 in the argument is ignored when the dialog box is generated as a result of the SAVE.AS? command. The result is that the file is saved in the Microsoft Excel 3.0 Normal format.

REFERENCES

"Microsoft Excel Function Reference," version 3.0, pages 166, 204-205


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.