Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Highlight a selected toolbar in a menu with a checkmark? aiyer[_61_] Excel Programming 3 September 3rd 04 08:14 PM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM
Placing checkmark beside menu item DonB[_2_] Excel Programming 1 July 27th 04 04:32 PM
New menu bar item Juan[_3_] Excel Programming 3 May 15th 04 10:43 AM


All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"