ID: Q193727
The information in this article applies to:
In Microsoft Excel, when you save a workbook from the Visual Basic Editor, the wrong workbook is saved. Specifically, Excel saves the active workbook from the main Excel window, instead of the one you wanted to save from the Visual Basic Editor.
This problem occurs when the following conditions are true:
-and-
-and-
To work around this problem, select VBAProject (<Bookname>) in the Project Explorer window, and then click Save <Bookname> on the File menu, where <Bookname> is the name of the workbook to be saved.
Microsoft has confirmed this to be a problem in Microsoft Excel 97 for Windows.
This problem occurs because Excel always assumes you want to save the active workbook, unless you specifically select another workbook in the Project Explorer each time before saving. After each save, Excel again selects the active workbook in the Project Explorer.
To determine the active workbook, while in the Visual Basic Editor, click "Close and Return to Microsoft Excel" on the File menu. In the main Excel Window, notice which workbook is currently displayed.
For more information about saving files, click Contents And Index on the Help menu, click the Index tab in Microsoft Help, type the following text
saving, files
and then double-click the selected text to go to the "Save a workbook"
topic. If you are unable to find the information you need, ask the Office
Assistant.
Additional query words: XL97 vbe
Keywords : kbdta xlloadsave xlvbainfo
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbnofix
Last Reviewed: November 5, 1998