Para definir sub-menús, prefije un menú padre con un guion. Los padres y sub-ítems son definidos como a continuación:
Function EA_GetMenuItems(Repository as EA.Repository, MenuLocation As String, MenuName As String) As Variant
Select Case MenuName
Case ""
'Parent Menu Item
EA_GetMenuItems = "-&Joe's Add-In"
Case "-&Joe's Add-In"
'Define Sub-Menu Items using the Array notation.
'In this example, "Diagram" and "Treeview" compose the "Joe's Add-In" sub-menu.
EA_GetMenuItems = Array("&Diagram", "&Treeview")
Case Else
MsgBox "Invalid Menu", vbCritical
End Select
End Function
|