how get the menu names

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how can I get the names of all menus in a form
Can anyone send me the code please

tanks
 
the code:

For Each mn As MenuItem In Me.MainMenu1.MenuItems
myname = mn.Text
Next

only get the top menu names
tanks
 
Carlos AZ said:
For Each mn As MenuItem In Me.MainMenu1.MenuItems
myname = mn.Text
Next

You will have to recursively enumerate menu items. If a menu item has
subitems, 'mn.MenuItems.Count' will return a number greater than 0.
 

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

Back
Top