CommandBar.Context Property
Gets or sets a string that determines where a command bar will be saved. The string is defined and interpreted by the application. Read/write.
Note
|
|---|
| The use of CommandBars in some Microsoft Office applications has been superseded by the new Ribbon user interface. For more information, search help for the keyword "Ribbon." |
Syntax
expression.Context
expression A variable that represents a CommandBar object.
Remarks
You can set the Context property only for custom command bars. This property will fail if the application doesn't recognize the context string, or if the application doesn't support changing context strings programmatically.
Example
This example displays a message box containing the context string for the command bar named "Custom". This example works in Microsoft Word and other applications that support the Context property.
| Visual Basic for Applications |
|---|
|
Note