Microsoft KB Archive/196618

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

Article ID: 196618

Article Last Modified on 10/22/2000

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q196618





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:

157951 OnSave Property Not Available in Object Browser

