![]() |
Checkmark on Menu Item
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. |
Checkmark on Menu Item
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) "DonB" wrote in message ... 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. |
Checkmark on Menu Item
Thanks, Bob. I'll give it a try.
DonB "Bob Phillips" wrote: 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) "DonB" wrote in message ... 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. |
All times are GMT +1. The time now is 10:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com