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

Button face 2

Status
Not open for further replies.

Tronsliver

Technical User
Sep 19, 2000
120
US
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
 
rmikesmith,

Thank you for your response this is exactly what I was looking for. Monday morning when I retrieve my work e-mail I'll mkae sure I give you a star.

Thanks Again :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top