Underscore in Excel Title Bar

C

Chris Gorham

Hi,

I've created an Add-in that generates its own entry in the
drop down list of Excel's main title bar using the
following code:

mItem = Application.CommandBars("Worksheet menu
bar").Controls.count
Set yMenu = Application.CommandBars("Worksheet menu
bar").Controls. _
Add(Type:=msoControlPopup, Before:=mItem)

With yMenu
.Caption = "Master Tool"
etc etc

This works great. However I would like to add the
underscore that allows the Alt key to select the add-in
(in this case it would be Alt M for Master Tool) which is
standard for the other drop down lists on that bar.

Thanks

Chris
 
C

Chip Pearson

Chris,

Use an ampersand (&) in the Caption property, just before the
letter you want to use as the shortcut key. E.g.,

.Caption = "&Master Tool"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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