Since a userform is part of the Excel app, the thinking
is that you don't need a userform menu. Why, because you
already have TOTAL control over excel's menus.
However, you can use a workaround. Ass a Combo box with
the correct labels in the list then process the On click
event....
Option ExplicitPrivate Sub cbMyMenu_Change()
Run cbMyMenu.Value
cbMyMenu.ListIndex = 0
End Sub
Private Sub UserForm_Initialize()
cbMyMenu.RowSource = "sheet2!MyMenu"
cbMyMenu.ListIndex = 0
End Sub
The form's initalise method reads the menu list from a
named range on my worksheet - make it easy to edit - and
sets the first item (zero based) in the list. The range
is two columns. The first column is the menu item and the
second is the name of the procedure to be run.
the combobox is set to two columns, the second is hidden
and the bound column is set to two also.
Each time an item is selected, the change event fires,
the change event code "runs" the value of the
combo....since this is the proc name, it runs the
required code.
Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
I would like to know that USERFORM in VAB can add
pulldown menu such as File, Edit, Tool, etc. Please
anyone let me know. Thank you