ID: Q173113
The information in this article applies to:
When you change and then close a workbook in Microsoft Excel 97, you are not prompted to save the changes.
This problem may occur if both of the following conditions are true:
-and-
To resolve this problem, do either of the following:
-or-
http://www.microsoft.com/support/supportnet/refguide/
The sample macro in following example prompts you to save the workbook. To
use the macro, follow these steps:
1. Start Microsoft Excel and create a new workbook.
2. Press ALT+F11 to open the Visual Basic Editor.
3. On the Insert menu, click Module.
4. Type the following into the new module:
Sub Caption_Macro()
'
'More code here.
'
'Changes the Caption property of the first window
Windows(1).Caption = "Window 1"
'Setting that the workbook has changed.
ActiveWorkbook.Saved = False
'
'More code here.
'
End Sub
5. Switch to Microsoft Excel (press ALT+F11).
6. On the Tools menu, point to Macro, and click Macros. Then, click
Caption_macro and click Run.
7. On the File menu, click Close.
You receive a message that prompts you to save the workbook.
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
In most cases, if you attempt to close a changed workbook that you have not saved, you are prompted to save the changes. To retain changes you want to keep, save them before you close the workbook.
The Saved property returns a True or False value depending on whether changes have been made to the workbook. Note that it is possible to set the Saved property to True or False.
For more information about saving files, click the Index tab in Microsoft Excel Help, type the following text
saving, files
and then double-click the selected text to go to the "Save a workbook"
topic.
Additional query words: XL97
Keywords : kbprg kbdta xlloadsave KbVBA
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbpending
Last Reviewed: May 18, 1999