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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programmatically Changing the Quick Access Toolbar

Status
Not open for further replies.

Aeneas

Programmer
Sep 18, 2003
25
CA
I used to use a nifty piece of code in Excel 2003 that could add buttons to a custom button bar:

Code:
Dim Magic8Ball As CommandBarButton

Set Magic8Ball = CommandBars("MyButtonBar").Controls.Add(msoControlButton)
Magic8Ball.FaceId = 1845
Magic8Ball.Style = msoButtonIcon
Magic8Ball.TooltipText = "Ask the Magic 8-Ball"
Magic8Ball.OnAction = "AskMagic"


Since one cannot use custom command bars in Excel 2007, how can I achieve this programmatically in VBA with the Quick Access Toolbar?

(It might also be helpful to find a way to view all the different FaceIDs available. I had code in Excel 2003 where you could look at them all and choose the one you like, but in Excel 2007 through the menu system, when you add a custom button, they only have 200 or so FaceIDs to choose from and they're pretty limited).

Thanks in advance!
 
From what I've been able to read up on this, there is no way to this.

You could still use the older menu creation commands, and the bars will be added to the Add-Ins Tab.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top