|  

» Edit the tooltip for toolbarbuttons using VBA in Microsoft Excel

VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
The examples below uses the New-button on the Standard toolbar as an example.
You can replace "Standard" with the name or number of another CommandBar, and the number of the Control you want to edit. Use this macro to change the tooltip text:
Sub ChangeToolTipsText()
    Application.CommandBars("Standard").Controls(1).TooltipText = "Test"
End Sub
Use this macro to reset the tooltips text:

Sub ResetToolTipsText()
    Application.CommandBars("Standard").Controls(1).TooltipText = ""
End Sub
Use this macro if you want to reset all custom settings for a Control::

Sub ResetAllControlSettings()
    Application.CommandBars("Standard").Controls(1).Reset
End Sub



Rate This Tip
12 34 5
Rating: 3.00     Views: 16323
No comments have been submitted.
Click here to post comment
For Registered Users
Name
Comment Title
Comments