.chm Helpfile for InputBox or MsgBox

C

ctyrrell

I am having trouble integrating my .chm helpfile with the InputBox &
MsgBox functions in my Access 2000 application. The .chm file is
working well with my HtmlHelp call as used in the following code:

Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" _
(ByVal hwndCaller As Long, ByVal pszFile As String, _
ByVal uCommand As Long, ByVal dwData As Long) As Long
Public Const HH_HELP_CONTEXT = &HF

HtmlHelp 0, CurrentProject.Path & "\MyHelp.chm", HH_HELP_CONTEXT,1

successfully opens topic 1 in my chm file.
But I cannot get the following to work:

Debug.Print InputBox(Prompt:="Press the help button.", _
HelpFileCurrentProject.Path & "\MyHelp.chm", Context:=1)

When I try it, it tries to run MSOHelp.exe and hangs and I have to use
the Task Manager to kill the MSOHelp.exe process.

The sample code at
http://msdn.microsoft.com/library/d...playinghelpbyusinginputboxmsgboxfunctions.asp
is
InputBox Prompt:="Enter data", _
HelpFile:=strAppPath & "\sample.chm", _
Context:="2001"

In my test case, I tried making the ContextID a string ("1" instead of
1) but got the same result.

It occured to me that perhaps .chm files are not supported, and perhaps
it has to be a winhelp file, but since this miscrosoft help example
uses "sample.chm" it seems that it SHOULD work.

Has anyone else had this problem? Any suggestions?
TIA,
Christine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top