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 Toggles

Status
Not open for further replies.

srmclean

Technical User
Jun 23, 2003
23
0
0
AU
How you do toggle a menu/commandbar item so it looks depressed (maybe with a tick next to it too) once pressed?

I have a custom menu set up and when I click one of the menu items it opens a form. What I would like to do is display that item on the menu as depressed when the form is open, to close the form, reclick the menu item and it goes back to normal and the form closes.

I can't seem to find a property in Access to a commandbutton to be "depressed" or "toggled".

Any ideas?
 
I do believe a CommandBarButton object has a State property.

The State property returns or sets the appearance of a command bar button control. It can be one of the following MsoButtonState constants: msoButtonUp, msoButtonDown, or msoButtonMixed. Read/write Long.

Hope this helps.


[pc2]
 
I managed to find the State Property and have a go, I got it to work but was unable to reference the msoButtonUp, msoButtonDown, etc. constants and had to use true & false. (it think)

The compiler just didn't recognise them and I have the Office Reference V9 turned on .. any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top