Workbook.CommandBars Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a Microsoft.Office.Core.CommandBars object that represents the Microsoft Office Excel command bars.
public:
property Microsoft::Office::Core::CommandBars ^ CommandBars { Microsoft::Office::Core::CommandBars ^ get(); };
public Microsoft.Office.Core.CommandBars CommandBars { get; }
member this.CommandBars : Microsoft.Office.Core.CommandBars
Public ReadOnly Property CommandBars As CommandBars
Property Value
A Microsoft.Office.Core.CommandBars object that represents the Microsoft Office Excel command bars.
Remarks
When a workbook is embedded in another application and activated by the user by double-clicking the workbook, using the property with a Workbook object returns the set of Excel command bars available within the other application. At all other times, using this property with a Workbook object returns null
. There is no programmatic way to return the set of command bars attached to a workbook. Command bars are associated with the application and not the workbook. This property exists on the workbook so you can access Excel application command bars when Excel is not the application.