I used to use a nifty piece of code in Excel 2003 that could add buttons to a custom button bar:
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!
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!