Microsoft KB Archive/111269

From BetaArchive Wiki

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

  1. Create a new workbook and insert a module sheet into it, making the module sheet active.
  2. Enter the following in the new module sheet:

           Sub MyTest()
           End Sub
    
  3. Save the workbook.
  4. From the Tools menu, choose Macro.
  5. Select "MyTest" from the list and then choose the Options button.
  6. Enter "This Is A Test" into the Status Bar Text box and choose the OK button. Then, choose the Close button.
  7. From the View menu, choose Toolbars, then select the Customize button.
  8. Select Custom from the Categories list. Then, drag the yellow "smiley face" button onto the standard toolbar.
  9. When the Assign Macro dialog box appears, select MyTest from the list, and then choose the OK button.
  10. Close the workbook, but DO NOT save the changes.
  11. Position the mouse cursor over the yellow smiley face toolbar button (the Status Bar text should read "This Is A Test").
  12. Re-open the workbook.
  13. Repeat steps 7 through 9 above, substituting the green "frown face" toolbar button for the yellow "smiley face" button you used in step 8.
  14. 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."

REFERENCES

"Visual Basic User's Guide," version 5.0, Chapter 12

For more information about toolbar buttons, choose the Search button in Help and type:

    toolbar buttons

KBCategory: kbusage

KBSubcategory:

Additional reference words: 7.00 5.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 13, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.