I want to write the following code, but MenuItems do not appear to have a name property (although the IDE seems be able to find it).

I don't want the Text property (e.g. &File), I want the name (e.g. mnuFile).

Anybody got any ideas?


VB Code:
  1. 'List the menu items.
  2.             Dim mnu As MenuItem
  3.             For Each mnu In MainMenu1.MenuItems
  4.                 Debug.Write(mnu.Name & vbCrLF)
  5.             Next mnu