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
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