John Walkenbach's Custom Menus

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

Guest

I have built a custom menu using John Walkenbach's MenuMaker routine located
at:
http://j-walk.com/ss/excel/tips/tip53.htm

What I would like is the capability to add a check mark (toggle on/off) like
is the case on the standard Excel menu for "View / Toolbars / Standard". Is
this a FaceID parameter? Any advice would be greatly appreciated.
 
The property in question is the state property.

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

You would need to add another column to the menu table with the initial
state, and then you have to toggle it within other code using code like that
shown above.

--
HTH


Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Thanks Bob. Worked Great!!

Bob Phillips said:
The property in question is the state property.

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

You would need to add another column to the menu table with the initial
state, and then you have to toggle it within other code using code like that
shown above.

--
HTH


Bob Phillips

(replace somewhere in email address with gmail 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