S
shulinl
All of a sudden, my personal comandbars cannot be added.
Every thing has been working greatly for the past many years.
Excel 2003
please hel.....p.
Do I need to add a certain reference? I only had problem today.
**********************************************
Sub ToolBar_EasyTools()
Dim myToolbar
Dim myControl
On Error GoTo create
MsgBox CommandBars("myBar")
create:
Set myToolbar = CommandBars.Add(Name:="myBar", Position:=msoBarTop,
Temporary:=False)
On Error Resume Next
Set myControl = CommandBars("myBar").Controls.Add(Type:=msoControlButton)
With myControl
.Caption = "sgdasf"
.Visible = True
.OnAction = "temp1"
.Style = msoButtonCaption
End With
'...............etc
CommandBars("myBar").Visible = True
End Sub
Every thing has been working greatly for the past many years.
Excel 2003
please hel.....p.
Do I need to add a certain reference? I only had problem today.
**********************************************
Sub ToolBar_EasyTools()
Dim myToolbar
Dim myControl
On Error GoTo create
MsgBox CommandBars("myBar")
create:
Set myToolbar = CommandBars.Add(Name:="myBar", Position:=msoBarTop,
Temporary:=False)
On Error Resume Next
Set myControl = CommandBars("myBar").Controls.Add(Type:=msoControlButton)
With myControl
.Caption = "sgdasf"
.Visible = True
.OnAction = "temp1"
.Style = msoButtonCaption
End With
'...............etc
CommandBars("myBar").Visible = True
End Sub