VBS Tutorial: VBScript Properties-helpcontext Properties _vbs

Source: Internet
Author: User

HelpContext Property

Sets or returns the context ID of the Help file topic.

object.HelpContext [= contextID]

Parameters

Object

Required option. The Err object.

ContextID

Options available. Valid identifier of the Help topic in the Help file.

Description

If you specify a Help file in HelpFile , the helpcontext property is used to automatically display the Help topic for the identity. If both HelpFile and helpcontext are empty, check the number property. If it corresponds to a VBScript run-time error value, the VBScript Help context ID for the error is used. If the number property does not correspond to a VBScript error, the directory of the VBScript Help file is displayed.

The following example illustrates how to use the helpcontext property:

An "Overflow" error occurred in 
  On Error Resume Nextdim MsgErr.ClearErr.Raise 6 ' .  err.helpfile = " Yourhelp.hlp      err.helpcontext  =  Yourcontextid     If err.number <> 0 Then   Msg =  Press  F1  key or  help  view  & Err.HelpFile &  with the following code> HelpContext "& _  "  Related Topics : "& err.helpcontext   MsgBox Msg,"  error : "& Err.Description, Err.HelpFile, Err.helpcontext   end If  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.