HelpFile 属性 |
|
HelpFile 属性语法有以下部分:
部分 | 描述 |
object | 必选。Err 对象。 |
contextID | 可选。帮助文件的完整有效路径。 |
On Error Resume Next Dim Msg Err.Clear Err.Raise 6 '发生“溢出”错误。 Err.Helpfile = "yourHelp.hlp" Err.HelpContext = yourContextID If Err.Number <> 0 Then Msg = "按下 F1 键或 Help 查看" & Err.Helpfile & "与下列 HelpContext " & _ " 有关的主题: " & Err.HelpContext MsgBox Msg, , "错误: " & Err.Description, Err.Helpfile, Err.HelpContext End If