XL98: Alert for Previous Version Displays Using OnSave Property (193482)
The information in this article applies to:
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q193482 SYMPTOMS
When you save a workbook to an earlier version of Excel, you may receive
the following message, where <filename> is the name of the workbook that
you are trying to save:
<filename> was created in a previous version of Microsoft Excel.
Do you want to update it to the new format?
To update it, click Yes.
To save it in the existing format, click No. Some types of changes
may be lost.
CAUSE
This behavior occurs when you have run a macro that is using the OnSave
property of the ActiveWorkbook, and you are saving to an earlier version of
Microsoft Excel.
WORKAROUNDMicrosoft 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.
To avoid this message when you save the workbook, temporarily change the
default workbook format. The following macro example illustrates how to do
this:
Dim bFlag As Boolean
Sub Auto_Open()
' Automatically invoke the OnSave property when user click Save
' and redirect to the Save_Macro routine.
ActiveWorkbook.OnSave = "Save_Macro"
End Sub
Sub Save_Macro(bFlag)
' Change the default file format to Excel 5.0.
Application.DefaultSaveFormat = xlExcel5
' Save the workbook
ActiveWorkbook.Save
' Change the default file format back to Excel 98.
Application.DefaultSaveFormat = xlWorkbookNormal
End Sub
REFERENCES
For more information about the BeforeSave event, 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:
176476 OFF: Office Assistant Not Answering Visual Basic Questions
Modification Type: | Major | Last Reviewed: | 6/17/2005 |
---|
Keywords: | kberrmsg kbprb KB193482 |
---|
|