Tronsliver
Technical User
I'm trying to custom build my own face for a commandbar button. Can someone give me a simple example. Also is there a listing anywhere for each ID for a button. For example ID:=3 is the "save" button face. In one of my older excel books it gave the complete listing of these button faces but I can't find an updated list.
Here is the code I'm using (thanks Skip)
Public Sub AutoRunSheet1()
Set myBar = CommandBars.Add(Name:="ClearTools1", _
Position:=msoBarLeft, Temporary:=True)
myBar.Visible = True
Set myControl = myBar.Controls _
.Add(Type:=msoControlButton, ID:=3)
With myControl
.DescriptionText = "Calculates stuff"
.Caption = "Calculate"
.OnAction = "FindDelta"
End With
End Sub
Here is the code I'm using (thanks Skip)
Public Sub AutoRunSheet1()
Set myBar = CommandBars.Add(Name:="ClearTools1", _
Position:=msoBarLeft, Temporary:=True)
myBar.Visible = True
Set myControl = myBar.Controls _
.Add(Type:=msoControlButton, ID:=3)
With myControl
.DescriptionText = "Calculates stuff"
.Caption = "Calculate"
.OnAction = "FindDelta"
End With
End Sub