Checkmark on Menu Item

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to be able to put a checkmark beside a menu item when the user selects
that item from the menu. For example, under the View menu when the user
selects Task Pane the pane appears and a checkmark appears beside the 'Task
Pane' on the menu.

I would expect something like CommandBarControl.checked but it's not that
straightforward.

I used to know how to do this but the method has slipped my mind. Please help.

Thank you.
 
This is an example of a macro assigned to a commandbar that would do this


With Application.CommandBars.Action­Control
If .State = msoButtonUp Then
ActiveWorkbook.Worksheets(.Cap­tion).Visible = xlSheetHidden
.State = msoButtonDown
Else
ActiveWorkbook.Worksheets(.Cap­tion).Visible = xlSheetVisible
.State = msoButtonUp
End If
End With



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks, Bob. I'll give it a try.
DonB

Bob Phillips said:
This is an example of a macro assigned to a commandbar that would do this


With Application.CommandBars.Action­Control
If .State = msoButtonUp Then
ActiveWorkbook.Worksheets(.Cap­tion).Visible = xlSheetHidden
.State = msoButtonDown
Else
ActiveWorkbook.Worksheets(.Cap­tion).Visible = xlSheetVisible
.State = msoButtonUp
End If
End With



--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Back
Top