当前位置: 首页 > 图文教程 > 脚本技术 > VBScript > VBS教程:VBscript属性-HelpFile 属性

VBScript
VBS教程:函数-LoadPicture 函数
VBS教程:函数-Len 函数
VBS教程:函数-Left 函数
VBS教程:函数-LCase 函数
VBS教程:函数-LBound 函数
VBS教程:函数-Join 函数
VBS教程:函数-IsObject 函数
VBS教程:函数-IsNumeric 函数
VBS教程:函数-IsNull 函数
VBS教程:函数-IsEmpty 函数
VBS教程:函数-IsDate 函数
VBS教程:函数-IsArray 函数
VBS教程:函数-Int、Fix 函数
VBS教程:函数-InStrRev 函数
VBS教程:函数-InStr 函数
VBS教程:函数-InputBox 函数
VBS教程:函数-Hour 函数
VBS教程:函数-Hex 函数
VBS教程:函数-GetRef 函数
VBS教程:函数-GetObject 函数

VBScript 中的 VBS教程:VBscript属性-HelpFile 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 67 ::
收藏到网摘: n/a

HelpFile 属性

设置或返回帮助文件的完整有效路径。

object.HelpFile [= contextID]

参数

object

必选项。Err 对象。

contextID

可选项。帮助文件的完整有效路径。

说明

如果在 HelpFile 中指定帮助文件,则当用户在错误消息对话框中单击帮助按钮(或按 F1 键)时,自动调用此文件。如果 HelpContext 属性包含指定文件的有效上下文 ID ,则自动显示该主题。如果未指定 HelpFile,则显示 VBScript Help 文件。

On Error Resume NextDim MsgErr.ClearErr.Raise 6 '产生“溢出”错误。Err.Helpfile = "yourHelp.hlp"Err.HelpContext = yourContextIDIf Err.Number <> 0 Then Msg = "按下 F1 键或 Help 查看" & Err.Helpfile & "与下列 HelpContext " & _ " 有关的主题: " & Err.HelpContext MsgBox Msg, , "错误: " & Err.Description, Err.Helpfile, Err.HelpContextEnd If