Microsoft KB Archive/192892

= XL98: Unexpected Behavior with Attached Toolbars =

Article ID: 192892

Article Last Modified on 9/11/2002

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q192892





SYMPTOMS
In Microsoft Excel 98 Macintosh Edition, custom toolbars can be attached to workbooks to allow the toolbar to be stored in the document, and these toolbars can be made available when the document is opened. However, the attached toolbar may not appear as expected.



CAUSE
This problem may occur when either of the following conditions is true:
 * The attached toolbar is not loaded. -or-


 * The attached toolbar reverts to a previous version.

For more information about these conditions, see the appropriate section in the "More Information" section later in this article.



WORKAROUND
To ensure that the latest copy of your custom toolbar is saved with the workbook, you need to reattach the toolbar to the workbook every time that it is modified. To do this, follow these steps:
 * 1) On the Tools menu, click Customize.
 * 2) In the Customize dialog box, click Attach.
 * 3) In the Custom Toolbars list, click to select your custom toolbar, and then click Copy.
 * 4) Click OK to close the Attach Toolbars dialog box.



Attached Toolbar Is Not Loaded
If a custom toolbar attached to a workbook has the same name as an existing custom toolbar in the current Microsoft Excel session, the attached toolbar will not replace the existing toolbar when the workbook is opened. Any Visual Basic macro code that references the attached toolbar will instead reference the pre-existing toolbar. For example, if a currently running Microsoft Excel session has an existing toolbar named "My Toolbar," and you open a file that has an attached toolbar also named "My Toolbar," Microsoft Excel will not load "My Toolbar" from the file. If a Visual Basic macro subsequently issues the command Toolbars("My Toolbar").Visible=True the preexisting toolbar in the Microsoft Excel session will be displayed rather than the recently attached toolbar.

Attached Toolbar Reverts to Previous Version
If you attach a custom toolbar to a workbook, modify it, and then save the workbook, the attached toolbar will not reflect any changes made after the toolbar has been attached. You will not notice this behavior until you open the workbook on a different computer. For example, you will notice this problem if you do the following:
 * 1) Create a custom toolbar named My Toolbar that has two buttons.
 * 2) Attach this toolbar to a workbook.
 * 3) Add a third button to My Toolbar.
 * 4) Save and close the workbook.

If you do not delete "My Toolbar" in the current session of Microsoft Excel, and if you reopen the file, the attached toolbar will not be loaded and three buttons will be seen on "My Toolbar." However, if you open the workbook in a different installation of Microsoft Excel (on another computer, for example) that does not contain a custom toolbar named "My Toolbar," the attached toolbar will be loaded, and "My Toolbar" will display the two buttons that were present at the time it was attached to the worksheet.

Additional query words: XL98

Keywords: kbprb KB192892

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.