Order of Drop-Down Menus

  • Thread starter Thread starter Paige
  • Start date Start date
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?
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top