chart menu bar vs worksheet menu bar

M

majikman

I just created a set of pop up menus for my worksheets but they aren'
visible in my charts. is it possible to have my menu visible on bot
without having to duplicate all the code in my worksheet menu procedur
to a chart menu procedure
 
R

Ron de Bruin

Hi

Application.CommandBars(1).Enabled = True
Worksheet menubar

Application.CommandBars(2).Enabled = True
Chart bar
 
M

majikman

sorry, but i don't quite understand what you're saying Ron. Maybe
should have been more specific and posted my code so here it is...

Dim newMenu As CommandBarPopup
Dim ctrlButton As CommandBarControl
Dim oCB As CommandBar
Dim oCtl As CommandBarControl

On Error Resume Next
Application.CommandBars("Worksheet Men
Bar").Controls("Bars2004").Delete
On Error GoTo 0

Set oCB = Application.CommandBars("Worksheet Menu Bar")

Application.CommandBars(1).Enabled = True

Application.CommandBars(2).Enabled = True

Set newMenu = oCB.Controls.Add(Type:=msoControlPopup
Temporary:=True
 
M

majikman

ok, i understand that I can do that. however, on m
application.commandbars(1), i have about 10 with statements below it
thats a lot of code. how could join the with statements from m
Worksheet Menu Bar with the ones from my Chart Menu Bar is what i'
askin
 
Top