Article ID: 125270 - View products that this article applies to.
This article was previously published under Q125270
This article has been archived. It is offered "as is" and will no longer be updated.
The following example allows you to save the active worksheet in a Microsoft Excel workbook to the Microsoft Excel 4.0 Worksheet file format by default. Note that this example can easily be modified to save a workbook to any desired file format by default.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. This example describes a method that allows you to save a worksheet to the Microsoft Excel 4.0 Worksheet file format by default by choosing a menu command. The example involves the following steps:
To Create the Procedure
For a list of the different FileFormat properties that you can use, choose the Search button in the Visual Basic Reference and type:
To Add the Procedure to a Menu
To Create the Add-in
In Microsoft Excel for the Macintosh, you can copy the file to the 'Excel Startup Folder (5)' folder located in the System Folder:Preferences folder (System 7.0 or later) or the System Folder (System 6.0).
For more information about the SaveAs Method, choose the Search button in the Visual Basic Reference and type:
Article ID: 125270 - Last Review: September 13, 2013 - Revision: 2.3