C
Charles in Iraq
All:
I use the following VBA code in the Workbook_Open procedure
to create a new dropdown menu named "TASS".
Set HelpMenu = Application.CommandBars(1).FindControl(ID:=30010)
If HelpMenu Is Nothing Then
Set myMenu = Application.CommandBars(1).Controls.Add _
(Type:=msoControlPopup, Temporary:=True)
Else
Set myMenu = Application.CommandBars(1).Controls.Add _
(Type:=msoControlPopup, Before:=HelpMenu.Index, Temporary:=True)
End If
With myMenu
.Caption = "&TASS"
End With
My problem is that everytime I open another Excel Workbook that
has this code, another identical "TASS" menu is created.
I would like to avoid this annoyance by somehow checking if the
"TASS" menu already exists before adding it.
Can anybody suggest a quick and simple way that I can check
if this menu already exists so that I don't add it again?
Respectfully,
Charles
I use the following VBA code in the Workbook_Open procedure
to create a new dropdown menu named "TASS".
Set HelpMenu = Application.CommandBars(1).FindControl(ID:=30010)
If HelpMenu Is Nothing Then
Set myMenu = Application.CommandBars(1).Controls.Add _
(Type:=msoControlPopup, Temporary:=True)
Else
Set myMenu = Application.CommandBars(1).Controls.Add _
(Type:=msoControlPopup, Before:=HelpMenu.Index, Temporary:=True)
End If
With myMenu
.Caption = "&TASS"
End With
My problem is that everytime I open another Excel Workbook that
has this code, another identical "TASS" menu is created.
I would like to avoid this annoyance by somehow checking if the
"TASS" menu already exists before adding it.
Can anybody suggest a quick and simple way that I can check
if this menu already exists so that I don't add it again?
Respectfully,
Charles