Use F1 to open a custom help file

Catalina

Registered User.
Local time
Today, 04:14
Joined
Feb 9, 2005
Messages
471
I created a custom help file (help.chm) for my application and I want to open it with F1.

The help file is located in the same folder as the Front End and of course needs to be
found regardless where the Front End is located.

So I need to get the full path to the front end and use that information in the
call to the help file.

In a module I created this function:

Public Function helpfile()

Dim strSource As String
strSource = [CurrentProject].[path] & "\help.chm"

Call Shell("c:\Windows\hh.exe " & strSource, vbNormalFocus)

End Function

Next I created an autokeys macro:

Macro Name: {F1}
Action: runcode
Function Name: helpfile()

Once the macro is saved it works like a charm.

Catalina
 
I did as per the instructions. It is not working. Attached is zip file.

This contains a help.chm file, helpTest.mdb and a word doc which shows the warning I am getting when I run this. Please let me know what I am doing wrong.

Cheers

Raghu

13-June-2011 Update ....

Came to know if you have used Microsoft SP2 you can not use this method. This will work with Windows 98 or Windows XP before being updated by SP2.


Raghu Prabhu
 
Last edited:

Users who are viewing this thread

Back
Top Bottom