HelpContext Property (Visual Basic for Applications)

Microsoft Visual Basic Constants

HelpContext Property

           

Returns or sets a string expression containing the context ID for a topic in a Help file. Read/write.

Remarks

The HelpContext property is used to automatically display the Help topic specified in the HelpFile property. If both HelpFile and HelpContext are empty, the value of Number is checked. If Number corresponds to a Visual Basic run-time error value, then the Visual Basic Help context ID for the error is used. If the Number value doesn’t correspond to a Visual Basic error, the contents screen for the Visual Basic Help file is displayed.

Note   You should write routines in your application to handle typical errors. When programming with an object, you can use the object's Help file to improve the quality of your error handling, or to display a meaningful message to your user if the error isn’t recoverable.