XL7: New Toolbar Button Properties in VB for Applications

Last reviewed: September 2, 1997
Article ID: Q149251
The information in this article applies to:
  • Microsoft Excel for Windows 95, version 7.0

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 engineers 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"

REFERENCES

For more information about the HelpContextId property, click the Index tab in Microsoft Excel Help, type the following text

   HelpContextId

and then double-click the selected text to go to the "HelpContextId property" topic.

NOTE: In the "HelpContextId property" topic, if you click "See Also," you can find information about both the HelpFile property and the StatusBar property.


Additional query words: 7.00

Keywords : PgmOthr xlwin kbcode kbprg
Version : 7.00
Platform : WINDOWS


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 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.