XL98: Incorrect Workbook Saved From Visual Basic Editor

ID: Q193722


The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition


SYMPTOMS

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.


CAUSE

This problem occurs when the following conditions are true:

  • You have multiple workbooks open.


  • -and-

  • You start the Visual Basic Editor and select a sheet that is not in the currently active workbook by clicking the sheet name in the Project Explorer window.


  • -and-

  • You save the workbook more than once while in the Visual Basic Editor.


The second time you perform the save command, instead of saving the same workbook again, Excel saves the active workbook from the main window.


WORKAROUND

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.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Excel 98 Macintosh Edition.


MORE INFORMATION

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.


REFERENCES

For more information about saving files, click Contents And Index on the Help menu (or on the Balloon Help menu if you are using a version of the Macintosh operating system earlier than 8.0), click the Index button in Microsoft Excel Help, type the following text

saving files, save
and then click Show Topics. Select the "Save a workbook" topic, and click Go To. If you are unable to find the information you need, ask the Office Assistant.

Additional query words: XL98 VBE

Keywords : kbdta xlloadsave xlvbainfo
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb


Last Reviewed: January 12, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.