Change Color of Caption Menu on Toolbar

G

Gary

I am generating my own custom tool bar. I am trying to generate something
that when I click on one of my menu items, it changes the text color (or
something that tells me that I click on the menu).

Can someone help me with information telling me how to change the color of
my menu or anything else that let me know that the menu button was clicked???

I can't find an event property that detects an on click event or anything.
Here is the example of my code used in the generation of the toolbar menu:


Set cbars = Application.CommandBars
Set cbar = cbars.Add(Name:="My Tool", Position:=msoBarTop,Temporary:=True)

cbar.Protection = msoBarNoCustomize
cbar.Context = Str(visUIObjSetDrawing) & "*"

On Error Resume Next

' ***********************************************
' Active Layer Control
' ***********************************************
Set cbButton1 = cbar.Controls.Add(Type:=msoControlButton)
With cbButton1
.Caption = " Skill Players "
.TooltipText = "Click for Skill Players"
.Tag = "cbbVBAMacro"
.Style = msoButtonCaption
'.FaceID = 7075
.OnAction = "ThisDocument.OffenseLayerActive"
End With
 

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

Top