vlg
asked on
How to attach/include a .chm file to the Click function on a Help->Topics menu?
Hello
I have a small app, and I have a menu that has Help as an option. Clicking on Help, you get the About option and a Help Topics option.
When the user clicks on the Help Topics option, I want the myHelp.chm file to be launched (it's MS HTML Help) in it's own little window (as normally happens).
Thanks
v
I have a small app, and I have a menu that has Help as an option. Clicking on Help, you get the About option and a Help Topics option.
When the user clicks on the Help Topics option, I want the myHelp.chm file to be launched (it's MS HTML Help) in it's own little window (as normally happens).
Thanks
v
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi TwistD
I'm getting a Run time error 13 "type mismatch" when I run your code.
Any thoughts?
Thanks rushka21, I'll try yours now.
I'm getting a Run time error 13 "type mismatch" when I run your code.
Any thoughts?
Thanks rushka21, I'll try yours now.
No Problem..
Regards
R
Regards
R
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'Call it
Public Function OpenHelpFile()
Dim lngRetVal
Dim strLocation
strLocation = app.path & "myHelp.chm" 'Here you put the path to your chm
lngRetVal = ShellExecute(me.hwnd,"open
if lngRetVal > 53
msgbox "Failure Attempting to Open Help File!"
end if
End Function
give that a try....
Or
try this: http://www.vbaccelerator.com/codelib/shell/shellex.htm
TwistD