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
in
Computers & Internet
➔ Programming & Design
First of all thanks for your great help. It is working fine.
Now i want to have only Text in custom toolbar. How can i achieve it?
If i am using msoCustomButton with caption only then click event is enable. I do not want that click event.
My requirement is simple text like 'Get Company Report' and it should not be clickable. Can you help me.
2006-08-02
21:04:20 ·
update #1