Microsoft KB Archive/112099

{|
 * width="100%"|

XL5: Can't Use Toolbar Button Name to Index Toolbar Buttons

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, version 5.0

-

SUMMARY
In Microsoft Excel version 5.0, the Visual Basic Reference Help topic on the ToolbarButton Method incorrectly states that you can use the name of a button to index toolbar buttons. This information is incorrect. If you use the name of the toolbar button to index the button, you will receive the following error message:

Run-time error '1004':

ToolbarButtons method of Toolbar class failed.

To index a toolbar button, you must use the number of the button, not the name.

MORE INFORMATION
To find the toolbar button's number, count the buttons (from left to right) on the toolbar that contains the button.

NOTE: Blank spaces between buttons count as one button.

To find the ToolbarButton Method Help topic, do the following:

 From the Help menu, choose Contents, and select Programming with Visual Basic.  Choose Search, and type the following: "ToolbarButtons Method" Choose Show Topics, then choose Go To.

Additional query words:

Keywords :

Version : 5.00

Platform : WINDOWS

Issue type :

Technology :