Exotic Menu Controls

P

Pflugs

I am trying to add different controls to my menu bars, but some control types
seem to require a different definition syntax than others. For example, I
can add a simple popup control using:

Set myPopup = myBar.Controls.Add(Type:=msoControlPopup)

But, I would like the control type to be "msoControlSplitButtonMRUPopup"
where the button includes a small drop down arrow on the right, as in the
Autosum control. When I use this syntax:

Set myPopup = myBar.Controls.Add(Type:=msoControlSplitButtonMRUPopup)

I get the error message: "Run-time error '5': Invalid procedure call or
argument." This same error is reached when I use many other control types
including msoControlSpinner, msoControlGraphicPopup, etc.

Why is this error occuring? Is it syntax? I would like to be able to use
different control types for my menus and toolbars.

Thanks,
Pflugs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top