Using the Move method of the CommandBar object I managed to move a CommandBarControl using the following syntax:

CommandBars("TopMenu").Controls("SomeControl").Move CommandBars("AnotherTopMenu")

I need, however, to move the control to a submenu (or popup menu) within a CommandBar and cannot find a way of doing it, as the first argument of the Move method will only accept a CommandBar object

有帮助吗?

解决方案

I subsequently found the answer here.

In a nutshell you need to use the CommandBar property of the popupmenu control.

CommandBars("AnotherTopMenu").Controls("PopupMenu").CommandBar
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top