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
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