PDA

View Full Version : Creating Combo Type Menu Bar



ChloeRadshaw
12-09-2008, 03:04 AM
Just wondering if anyone can shed light on how to create a submenu where only one item in the sub menu can be checked?



Any ideas please?

Thanks

georgiboy
12-09-2008, 03:34 AM
Hi,

Do you mean in a form or on a spreadsheet?

ChloeRadshaw
12-09-2008, 03:51 AM
Sorry - No I mean inside the excel menu as a new menu item ....

I can already create a menu (using a command bar) and sub menu using a msoControl

Set cbcCutomMenu = cbcCutomMenu.Controls.Add(Type:=msoControlPopup)

What I cannot do is have this behave like a radio menu.....

Bob Phillips
12-09-2008, 04:07 AM
I don't think the option button is a menu control type, so you would have to emulate it some way, not necessarily well.

ChloeRadshaw
12-09-2008, 04:52 AM
I don't think the option button is a menu control type, so you would have to emulate it some way, not necessarily well.


This is strange - Having a little tick next to the menu items (like the other Excel menus) is not possible?

ie under View in normal Excel you see ticks for "Forumal Bar " - Thats exactly what I would like....

Bob Phillips
12-09-2008, 04:58 AM
a tick is not an option button, it just indicates a state for that control.

Bob Phillips
12-09-2008, 05:24 AM
If you just want to assign a tick at some point, set the control's State property to msoButtobDown (Up to remove it).

ChloeRadshaw
12-09-2008, 08:37 AM
If you just want to assign a tick at some point, set the control's State property to msoButtobDown (Up to remove it).

I could kiss you on both cheeks - Thank you that worked!

ChloeRadshaw
12-09-2008, 11:30 AM
So I ve set this up - However in my macro I need to know which button was clicked and then change the .State property....

Does the call back provide an argument?

Bob Phillips
12-09-2008, 11:49 AM
What callback?

You have to either save a control variable for the control, or access it via the menu hierarchy.