D
Dan Bair
Hi;
Dave gave me some code to call a help topic from a module
that's activated from the tool bar. It's supposed to get
the current path/directory/filename of my help file and
the helpcontextid of the form that is active and then
display that topic. I'm getting an error message when I
run the code. This is Dave's Code:
--------------------------------------------------------
Place the following function in a module, and then call
it
from the button click event, passing the the full path of
the helpfile and the contextID
Function OpenHelpWithContextID(ByVal strHelpFileName As _
String, lngContextID As Long)
' Opens the Help file to ContextID.
WinHelp Application.hWndAccessApp, ByVal strHelpFileName,
_
HELP_CONTEXT, ByVal lngContextID
End Function
You need to place this constant
Public Const HELP_CONTEXT = &H1
In the general section of the module and this also
Declare Sub WinHelp Lib "user32" Alias _
"WinHelpA" (ByVal hWnd As Long, ByVal lpHelpFile As
String, _
ByVal wCommand As Long, ByVal dwData As Any)
Dave
--------------------------------------------------------
PROBLEM: When I run the module I get this error message:
"The object dosen't contain the Automation
object 'strHelpFileName'.
Hope you're still out there Dave, but I could use some
help from anybody. I'm new and clueless.
Thanks,
Dan
Dave gave me some code to call a help topic from a module
that's activated from the tool bar. It's supposed to get
the current path/directory/filename of my help file and
the helpcontextid of the form that is active and then
display that topic. I'm getting an error message when I
run the code. This is Dave's Code:
--------------------------------------------------------
Place the following function in a module, and then call
it
from the button click event, passing the the full path of
the helpfile and the contextID
Function OpenHelpWithContextID(ByVal strHelpFileName As _
String, lngContextID As Long)
' Opens the Help file to ContextID.
WinHelp Application.hWndAccessApp, ByVal strHelpFileName,
_
HELP_CONTEXT, ByVal lngContextID
End Function
You need to place this constant
Public Const HELP_CONTEXT = &H1
In the general section of the module and this also
Declare Sub WinHelp Lib "user32" Alias _
"WinHelpA" (ByVal hWnd As Long, ByVal lpHelpFile As
String, _
ByVal wCommand As Long, ByVal dwData As Any)
Dave
--------------------------------------------------------
PROBLEM: When I run the module I get this error message:
"The object dosen't contain the Automation
object 'strHelpFileName'.
Hope you're still out there Dave, but I could use some
help from anybody. I'm new and clueless.
Thanks,
Dan