Microsoft KB Archive/149251

= New Toolbar Button Properties in VB for Applications =

Article ID: 149251

Article Last Modified on 10/10/2006

-

APPLIES TO


 * Microsoft Excel 95 Standard Edition

-



This article was previously published under Q149251



SUMMARY
In Microsoft Excel version 7.0, three new toolbar button properties that you can use with Visual Basic for Applications have been added. These properties are as follows:

HelpContextId

HelpFile

StatusBar



MORE INFORMATION
Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support professionals can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.

In Microsoft Excel version 5.0, these toolbar properties are accessible only when you initially create the toolbar button. In Microsoft Excel 5.0, you access these toolbar properties through the ToolbarButtons.Add method, which has these property settings as arguments; however, because the properties are not a part of the Microsoft Excel version 5.0 object model, once you set these properties, they become inaccessible and you are unable to edit them.

In Microsoft Excel version 7.0, you can set these properties at any time. To set the status bar text of the first button on "My Toolbar" to say "New Message Here," use the following example: Toolbars("My Toolbar").ToolbarButtons(1).StatusBar = "New Message Here"

