MenuItem.GetSubMenu
-------------------

Returns the submenu associated with the receiving menu item.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "MenuItem.GetSubMenu"; Item ) 

**MBS**( **"MenuItem.GetSubMenu";** /\* Returns the submenu associated with the receiving menu item. \*/  
**$Item**) /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Item | The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). | $item |

### Result

Returns menu reference number or error.

### Description

Returns the submenu associated with the receiving menu item.  
Returns empty text if no submenu is associated with it.  
See also [MenuItem.SetSubMenu](MenuItemSetSubMenu.md).  
### See also

- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetHidden](MenuItemGetHidden.md)
- [MenuItem.GetState](MenuItemGetState.md)
- [MenuItem.HasSubmenu](MenuItemHasSubmenu.md)
- [MenuItem.SetSubMenu](MenuItemSetSubMenu.md)

This function checks for a license.

Created 18th August 2014 , last changed 31st August 2014

  
[MenuItem.GetStrikeOut](MenuItemGetStrikeOut.md) - [MenuItem.GetTag](MenuItemGetTag.md)

[HTML Version](MenuItemGetSubMenu.shtml)