Table of contents
Collapse the table of content
Expand the table of content

CommandBarButton.Reset Method (Office)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Resets a built-in CommandBarButton control to its original function and face.

Note The use of CommandBars in some Microsoft Office applications has been superseded by the new ribbon component of the Microsoft Office Fluent user interface. For more information, search Help for the keyword "ribbon."


expression. Reset

expression A variable that represents a CommandBarButton object.


Resetting a built-in control restores the actions originally intended for the control and resets each of the control's properties back to its original state.


This example customizes a command bar button. First, the button properties are reset to their default state. Then various button properties are set.

Dim cbButton As CommandBarButton 
Set cbButton = CommandBars("Custom").Controls(2) 
With cbButton 
    .BuiltInFace = True  
    .Caption = "Compute Total" 
    .DescriptionText = "This button computes the total of all purchases." 
    .Enabled = True  
    .TooltipText = "Click to compute total amount for all items in your cart." 
End With

See also


CommandBarButton Object

Other resources

CommandBarButton Object Members

© 2018 Microsoft