I have to add a custom toolbar that should contain label and button in Excel 2000. I am not able to use msoControlLable and msoControlButton properly. If i m using msoControlButton then caption (text) does not display on runtime. Can somebody help me?
Dim cbBar As CommandBar, cbCtrl1 As CommandBarControl, cbCtrl2 As CommandBarControl
Call DeleteTMCToolbar
Set cbBar = CommandBars.Add(Name:=cCommandBarID, Position:=msoBarTop)
Set cbCtrl1 = cbBar.Controls.Add(Type:=msoControlButton)
With cbCtrl1 '
.BeginGroup = False
.DescriptionText = "Gen"
.DescriptionText = 0
.FaceId = 0
.Caption = "DFA555SDA"
.TooltipText = "General"
'.Name = "Padam"
' .Caption = "TMC"
' .DescriptionText = "Dfasdfas"'
End With
Set cbCtrl2 = cbBar.Controls.Add(Type:=msoControlEdit)
With cbCtrl2
.Caption = "TMC1"
.DescriptionText = "Dfasdfas" '
End With
2006-08-02
18:35:16
·
1 answers
·
asked by
padam_india
1