Applies To
MenuItem Object, ToolbarButton Object.
Description
Returns or sets the Help context ID (a number) for the Help topic attached to the menu item or toolbar button. Read-write. Microsoft Windows only.
Remarks
To use this property, you must also set the HelpFile property.
See Also
HelpFile Property, StatusBar Property.
Example
This example adds a new menu item to the Help menu on the Visual Basic Module menu bar, and then it sets the status bar text, the Help filename, and the Help context ID for the new menu item (note that the HelpFile and HelpContextId properties are Windows-only properties).
Set menuObj = MenuBars(xlModule).Menus("Help") Set newMenuItem = menuObj.MenuItems.Add(Caption:="&Read Me First", _ OnAction:="readmeMacro", _ Before:=1) newMenuItem.StatusBar = "Read this topic before you begin" newMenuItem.HelpFile = "C:\xl5\vba_xl.hlp" newMenuItem.HelpContextID = 65535