Microsoft® Visual Basic® Scripting Edition
HelpFile Property
 Language Reference 
Version 2 

See Also                    Applies to


Description
Sets or returns a fully qualified path to a Help File.
Syntax
object.HelpFile [= contextID]

The HelpFile property syntax has these parts:

Part Description
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