Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

menu item checkbox

Status
Not open for further replies.

RobBroekhuis

Technical User
Oct 15, 2001
1,971
US
I think this is an easy one - but I can't seem to find out how to do it. I'm trying to add a checkbox to a custom menu item (a CommandBarPopup), and can't find a property to add the checkmark. What's the easiest way to get one?
Thanks
Rob
 
Rob,

I believe that you can't add a check box ,but you can make menu item checked during runtime,by adding the enabling the property in the click event code:
menutitem.checked = true.
Hope this helps.

Cheers
Ammai
 
Ammai,
As far as I can tell, there is no "checked" property for a menu item. At least, when I execute in the direct window the following code:
Code:
set menuitem=application.CommandBars(1).Controls("&Catalog").controls(3)
menuitem.checked=true
I get an error message about an undefined property.
typename(menuitem) is "commandbarbutton"

Is this not as simple as I had hoped?
Rob
 

For the record, I figured it out. The command is:

menuitem.state = msoButtonUp (or msoButtonDown)

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top