Thread: Command Bars
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jfcby jfcby is offline
external usenet poster
 
Posts: 33
Default Command Bars

jfcby,

Question:
With the macro above is there a way to add a custom button to the
Toolbar without deleing then recreating it?

Answer:

Yes, with the macro below.

<MACRO CODE

Sub CreateOtherCommandBar_AddToolBarControls()
'Add toolbar controls
Dim Cmdb
Set Cmdb = CommandBars(TBN).FindControl(Type:=msoControlPopup ,
ID:=1)

With Cmdb.Controls.Add(Type:=msoControlButton)
.Caption = "Btn 4"
End With
End Sub

<MACRO CODE

Thank you for your help and response,
jfcby