Order of Drop-Down Menus

P

Paige

I have various menus that are added when Excel opens, as a result of coding
I've added in Personal.xla. How do I indicate what order I want these to be
in? I want them to start after Excel's 'HELP', and then be in a certain
order after that. Can someone advise how to do this?
 
P

paul.robinson

Hi
This will put a new control after Help

iHelpIndex = cbWSMenuBar.Controls("Help").Index
Set muCustom = cbWSMenuBar.Controls.Add(Type:=msoControlPopup,
after:=iHelpIndex)

you can use before instead of after too.
You can change "Help" to any other existing control as you add of
course.
regards
Paul
 
P

Paige

Thanks, Paul!

Hi
This will put a new control after Help

iHelpIndex = cbWSMenuBar.Controls("Help").Index
Set muCustom = cbWSMenuBar.Controls.Add(Type:=msoControlPopup,
after:=iHelpIndex)

you can use before instead of after too.
You can change "Help" to any other existing control as you add of
course.
regards
Paul
 
Top