Thread: Custom Toolbar
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert[_32_] Robert[_32_] is offline
external usenet poster
 
Posts: 23
Default Custom Toolbar

I have added a custome toolbar with the following code. I would like to add
a tooltip to this button. Also, can I have a button with text instead of the
icon?

Dim cb As CommandBar
Set cb = CommandBars.Add
With cb
.Name = "SWAP"
.Position = msoBarTop
End With

Set myBar = CommandBars("SWAP")
Set myControl = myBar.Controls _
.Add(Type:=msoControlButton, _
Temporary:=True)
With myControl
.FaceId = 47
.Width = 75
.OnAction = "ResetValues"
End With
myBar.Visible = True

Many Thanks
--
Robert Hill