Microsoft KB Archive/111269

= Microsoft Knowledge Base =

XL: Status Bar Text for Toolbar Button Changes Unexpectedly
Last reviewed: September 13, 1996

Article ID: Q111269

The information in this article applies to:


 * Microsoft Excel for Windows, versions 5.0, 5.0c
 * Microsoft Excel for the Macintosh, versions 5.0, 5.0a
 * Microsoft Excel for Windows NT, version 5.0
 * Microsoft Excel for Windows 95, version 7.0

SYMPTOMS
The text that appears in the status bar when the mouse pointer is positioned over a toolbar button in Microsoft Excel version 5.0 may revert to a default value unexpectedly.

CAUSE
This change in the status bar occurs when the macro assigned to that toolbar button is also assigned to another button.

WORKAROUND
To keep the problem from occurring, save changes to the document after you assign status bar text to a macro.

MORE INFORMATION
In Microsoft Excel version 5.0, status bar text is assigned to macros from the Macro Options dialog box. To select this dialog box, choose Macro from the Tools menu, and then choose Options.

When a macro is assigned to a toolbar button, the Status Bar text assigned to the macro is also assigned to the toolbar button and will be saved with the document containing the macro.

If the Status Bar text is not saved (that is, if changes to the document are not saved), the toolbar button will still retain the text assignment until that macro is assigned to an additional button. At that time, the original toolbar button's status bar text will revert to the text default value.

Steps to Reproduce Behavior
 Create a new workbook and insert a module sheet into it, making the module sheet active.  Enter the following in the new module sheet: Sub MyTest End Sub  Save the workbook. From the Tools menu, choose Macro. Select "MyTest" from the list and then choose the Options button. Enter "This Is A Test" into the Status Bar Text box and choose the OK button. Then, choose the Close button. From the View menu, choose Toolbars, then select the Customize button. Select Custom from the Categories list. Then, drag the yellow "smiley face" button onto the standard toolbar.</li> When the Assign Macro dialog box appears, select MyTest from the list, and then choose the OK button.</li> Close the workbook, but DO NOT save the changes.</li> Position the mouse cursor over the yellow smiley face toolbar button (the Status Bar text should read "This Is A Test").</li> Re-open the workbook.</li> Repeat steps 7 through 9 above, substituting the green "frown face" toolbar button for the yellow "smiley face" button you used in step 8.</li> Position the mouse cursor over either new toolbar button. The Status Bar text for both buttons will read "Creates a button to which you can assign a macro."</li></ol>