XL97: OnSave Property Doesn't Run Using Save As Command

ID: Q196618

The information in this article applies to:

SYMPTOMS

When you click Save As on the File menu, the macro you designated to run using the OnSave property doesn't run. However, the macro does run when you click Save on the File menu or click the Save button on the Standard toolbar.

CAUSE

This problem occurs when you use the OnSave property under Microsoft Excel 97 for Windows. This is different behavior than in Microsoft Excel for Windows 95, version 7.0, in which the OnSave property works as expected when you click Save As on the File menu.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Excel 97 for Windows.

MORE INFORMATION

The OnSave property is included in Excel 97 for backwards compatibility with Excel 7.0. Microsoft introduced the OnSave property in Microsoft Excel for Windows 95, version 7.0, but you can still use it in Microsoft Excel 97.

The OnSave property returns or sets the name of a Visual Basic procedure to run after the user invokes the Save command, but before the workbook is actually saved. Excel 97 replaced the OnSave property with the BeforeSave event.

For additional information about the OnSave property, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q157951
   TITLE     : XL97: OnSave Property Not Available in Object Browser

REFERENCES

For more information about BeforeSave, from the Visual Basic Editor, click the Office Assistant, type "BeforeSave," click Search, and then click to view "BeforeSave Event."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If the Assistant is not able to answer your query, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q176476
   TITLE     : OFF: Office Assistant Not Answering Visual Basic Questions

Additional query words: XL97
Keywords          : kbdta
Version           : WINDOWS:97
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbpending

Last Reviewed: January 8, 1999