property Item.ID as Long

Retrieves or sets a value that indicates the item's identifier.

TypeDescription
Long A long expression that indicates the item's identifier.

It is recommended to use unique identifiers for items. If the menu contains more items with the same identifier the Command property retrieves the first occurrence. Use the Add property to add a new item to the menu. You can associate an identifier to an item using the Add property of the Menu object. Use the Items property of the control to access the control menu items. The following sample shows how to add a new item of bullet type:

With PopupMenu1.Items
.Add("Item", Default, 1234).Bullet = True
End With