The information in this article applies to:
SYMPTOMSIn Microsoft Excel, if you use the Add method of the ToolbarButtons object in a Visual Basic procedure, to both add a button to a toolbar and to assign a macro to the button, the macro status bar text is not added to the button. CAUSEThis behavior occurs if you add the button to the toolbar and assign the macro to the button using one line in the procedure, as in the following example:
When you use the OnAction argument along with the other named
arguments of the Add method, the status bar text for the macro that
you assign to the button is not added to the button. Instead, the
default status bar text for the button that you assign to the toolbar
is displayed in the status bar when you either choose the button or
place the mouse pointer over the button.
WORKAROUNDS
To avoid this behavior, use one line in the procedure to add the
button to the toolbar, and use a separate line in the procedure to
assign the macro to the button. The following is an example of this method:
-or-
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel version 5.0c. MORE INFORMATIONFor additional information, see the following article(s) in the Microsoft Knowledge Base: Q112632 Setting Status Bar Text and ToolTips for Toolbar Buttons REFERENCESFor more information about the OnAction Property, choose the Search button in the Visual Basic Reference and type: OnAction Property Additional query words: incorrect wrong
Keywords : |
Last Reviewed: October 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |