CommandBar.NameLocal property (Office)

Gets the name of a built-in command bar as it's displayed in the language version of the container application, or returns or sets the name of a custom command bar. Read/write.

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, see Overview of the Office Fluent ribbon.

Syntax

expression.NameLocal

expression A variable that represents a CommandBar object.

Remarks

Note

If you attempt to set this property for a built-in command bar, an error occurs.

The local name of a built-in command bar is displayed in the title bar (when the command bar isn't docked) and in the list of available command bars, wherever that list is displayed in the container application.

If you change the value of the LocalName property for a custom command bar, the value of Name changes as well, and vice versa.

Example

This example displays the name and localized name of the first command bar in the container application.

With CommandBars(1) 
    MsgBox "The name of the command bar is " & .Name 
    MsgBox "The localized name of the command bar is " & .NameLocal 
End With

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.