Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

label in Execl commanbar

Status
Not open for further replies.

AtomicWedgie

IS-IT--Management
Jul 10, 2002
227
0
0
NL
Hi,

is it possible to place a label in a Commandbar without it being attached to a CommandbarButton?

Greetz,

Atomic Wedgie
 
You can use the tag property to attach information to the commandbar, and other controls.

e.g.

Application.CommandBars("Worksheet Menu Bar").Tag = "my customized"
 
I think you mean you want just text, not an icon, to appear on the toolbar. You can do that. For example, to add a caption-only "button" called "Hello" to the standard toolbar, you would use:

set nc=application.CommandBars(3).controls.add
nc.style=msoButtonCaption 'this is what you're looking for
nc.caption="Hello"

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top