PDA

View Full Version : Sleeper: Display correct toolbar icon on starting excel application program



ilyaskazi
06-14-2005, 06:45 AM
following is the code which creates toolbar buttons.
I m using office xp 2003. When i start excel program, it doesnt display correct toolbar icon for which i hv given face-id. But when i move my mouse over the button, then it changes to the correct one.



Sub CreateBar()
Dim oBar As CommandBar
Dim oKicker As CommandBarControl
RemoveBar 'Prevents duplicate entry
Set oBar = Application.CommandBars.Add(Name:="SKicker", Position:=1, Temporary:=True)
oBar.Visible = True
Set oKicker = oBar.Controls.Add(ID:=1, Before:=1)
With oKicker
.OnAction = "General.Show_SuperKicker"
.FaceId = 9744
.Caption = "SUPERKICKER"
End With
Set oKicker = Nothing
Set oBar = Nothing


I need to display correct toolbar-icon when excel program (xp2003) is started. Also some face-id doesnt work with office-2000-- why so?? It gives debug msg.

Plz Note, this post is already posted: http://www.excelforum.com/showthread.php?t=378265

ilyaskazi
06-14-2005, 09:38 PM
I hv lots of toolbar items and I want them to be under groups.

is it possible to make group in toolbar programatically??

ilyaskazi
06-15-2005, 08:52 PM
Grouping is done and thankyou all for the same.

I need to know whether seprators between toolbar buttons and in group buttons are possible?? and how?