Visual Basic Scripting Edition  

HelpFile Property

Sets or returns a fully qualified path to a Help File.

object.HelpFile [= contextID]

Arguments

object
Required. Always the Err object.
contextID
Optional. Fully qualified path to the Help file.

Remarks

If a Help file is specified in HelpFile, it is automatically called when the user clicks the Help button (or presses the F1 key) in the error message dialog box. If the HelpContext property contains a valid context ID for the specified file, that topic is automatically displayed. If no HelpFile is specified, the VBScript Help file is displayed.

On Error Resume Next
Dim Msg
Err.Clear
Err.Raise 6   ' Generate "Overflow" error.
Err.Helpfile = "yourHelp.hlp"
Err.HelpContext = yourContextID
If Err.Number <> 0 Then
   Msg = "Press F1 or Help to see " & Err.Helpfile & " topic for" & _
   " the following HelpContext: " & Err.HelpContext
   MsgBox Msg, , "error: " & Err.Description, Err.Helpfile, Err.HelpContext
End If

Requirements

Version 2

See Also

Description Property | HelpContext Property | Number Property | Source Property

Applies To: Err Object