Command BarPopup Object

This object represents a menu or submenu on a CommandBar, which can contain other CommandBar controls within them.

Because CommandBarPopup controls can have other controls added to them, they are in effect a separate CommandBar. For example, assuming the first control on a custom CommandBar named Wrox is a CommandBarPopup control, the following code can be used to reference and treat the control as if it were just another CommandBar:

Dim

oBar

as CommandBar

Set

oBar

= CommandBars("Wrox";

i.Controls(1).CommandBar

To reference the same control as a CommandBarPopup:

Dim

ctl

As CommandBarPopup

Set

ctl

= CommandBars("Wrox")

.Controls(l)

0 0

Post a comment