O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Err.HelpFile Property

Data Type

String

Description

A read/write string property that contains the fully qualified path of a Windows Help or HTML Help file.

Rules at a Glance

The HelpFile property can be set either directly or by supplying the fourth parameter (the helpfile parameter) to the Err.Raise method.

Example

See Err.HelpContext.

Programming Tips and Gotchas

  • Some objects you may use within your application have their own help files, which you can access using HelpFile to display highly focused help to your users.

  • Remember that once the program encounters an On Error statement, all the properties of the Err object are reset; this includes HelpFile. You must therefore set the Err.HelpFile property each time your application needs to access the help file.

  • In ASP applications, the HelpContext and HelpFile properties should not be used, since context-sensitive help on the server is undesirable. In IE applications, particularly those that are accessible over the Internet, use of the HelpContext and HelpFile properties is not advisable, since you can’t be certain that the appropriate help file is available on the client.

VBA/VBScript Differences

Much of the utility of the HelpFile and HelpContext properties in VBA stems from the fact that, for errors recognized by the runtime engine, these values are automatically supplied to the Err object and can in turn be passed to the MsgBox function. In VBScript, however, these values are not updated automatically; if you want to use a help file or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required