SubMenu Example

Using Programming Languages other than VBA

Sub Example_SubMenu()
	' This example finds the menu used as the sub menu for the
	' "Autodesk on the Web" menu item in the Help menu.

	Dim acadMenuGroup As acadMenuGroup
	Set acadMenuGroup = ThisDrawing.Application.MenuGroups.Item("ACAD")

	Dim helpMenu As AcadPopupMenu
	Set helpMenu = acadMenuGroup.Menus.Item("&Help")

	Dim WebMenuItem As AcadPopupMenuItem
	Set WebMenuItem = helpMenu.Item(5)
	Dim subWebMenu As AcadPopupMenu
	Set subWebMenu = WebMenuItem.subMenu

	MsgBox "The name of the submenu is " & subWebMenu.TagString
End Sub