CommandBarPopup.OLEMenuGroup property (Office)

Gets or sets an MsoOLEMenuGroup constant that represents the menu group that the specified CommandBarPopup control belongs to when the menu groups of the OLE server are merged with the menu groups of an OLE client (that is, when an object of the container application type is embedded in another application). Read/write.


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.



expression A variable that represents a CommandBarPopup object.



This property is read-only for built-in controls.

This property is intended to allow add-in applications to specify how their command bar controls will be represented in the Office application. If either the container or the server does not implement command bars, normal OLE menu merging occurs: the menu bar is merged, and all the toolbars from the server, and none of the toolbars from the container. This property is relevant only for pop-up controls on the menu bar because menus are merged on the basis of their menu group category.

If both of the merging applications implement command bars, command bar controls are merged according to the OLEUsage property.


This example checks the OLEMenuGroup property of a new custom popup control on the command bar named Custom and sets the property to msoOLEMenuGroupNone.

Set myControl = CommandBars("Custom").Controls _ 
myControl.OLEMenuGroup = msoOLEMenuGroupNone

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.