How do you specify the Help file to be used

M

Mike

I'm using Excel 2007 and I am trying to assign Help to the various controls.
I've built the help file(CHM) and have used the following to test it:

Application.Help FilePathandName, ContextID

everything displays fine.

However, for CommandButton1, I've set its HelpContextID and set the form's
WhatsThisButton and WhatsThisHelp to True and things still don't seem to
work. The Help button comes out in the Title bar and the Question mark comes
out with the cursor when the Help button is clicked. However, nothing
happens when I click on CommandButton1. How do you let it know which Help
file you want to use?

Thanks for any thoughts,

Mike
 
J

Jim Cone

Thoughts from the xl97 help file (better, faster, stronger) ...

"The topic identified by the HelpContextID property is available to users when a form is running. To display the topic, the user
must either select the control or set focus to the control, and then press F1."
Copyright(c) 1996 Microsoft Corporation.
--
Jim Cone
Portland, Oregon USA




"Mike" <[email protected]>
wrote in message
I'm using Excel 2007 and I am trying to assign Help to the various controls.
I've built the help file(CHM) and have used the following to test it:

Application.Help FilePathandName, ContextID

everything displays fine.
However, for CommandButton1, I've set its HelpContextID and set the form's
WhatsThisButton and WhatsThisHelp to True and things still don't seem to
work. The Help button comes out in the Title bar and the Question mark comes
out with the cursor when the Help button is clicked. However, nothing
happens when I click on CommandButton1. How do you let it know which Help
file you want to use?
Thanks for any thoughts,
Mike
 
M

Mike

The link info is for pulling out Excel help.

I have built my own help file which I have assigned contextIds for all the
controls in my application. Now, by using the forms "WhatsThisButton" and
"WhatsThisHelp" properties, I want to click on the HELP BUTTON in the title
bar and then click on one of my controls to bring out the help fo my
control. The problem is that I don't know how to tell the application where
my CHM file is. Application.Help(File,ID) doesn't do the job.
 
J

Jim Cone

Did you include the file path when you entered the file name?
If the .chm file is in the same folder as the workbook then...

Application.Help ThisWorkbook.Path & "\FileName.chm", 1234
--
Jim Cone
Portland, Oregon USA



"Mike" <[email protected]>
wrote in message
The link info is for pulling out Excel help.
I have built my own help file which I have assigned contextIds for all the
controls in my application. Now, by using the forms "WhatsThisButton" and
"WhatsThisHelp" properties, I want to click on the HELP BUTTON in the title
bar and then click on one of my controls to bring out the help fo my
control. The problem is that I don't know how to tell the application where
my CHM file is. Application.Help(File,ID) doesn't do the job.
 
M

Mike

Application.Help will display my help file IMMEDIATELY, NOT when I cl;ick on
the desired control after clicking the "WhatsThis" HELP button in the Title
bar.


Jim Cone said:
Did you include the file path when you entered the file name?
If the .chm file is in the same folder as the workbook then...

Application.Help ThisWorkbook.Path & "\FileName.chm", 1234
--
Jim Cone
Portland, Oregon USA



"Mike" <[email protected]>
wrote in message
The link info is for pulling out Excel help.
I have built my own help file which I have assigned contextIds for all the
controls in my application. Now, by using the forms "WhatsThisButton" and
"WhatsThisHelp" properties, I want to click on the HELP BUTTON in the
title
bar and then click on one of my controls to bring out the help fo my
control. The problem is that I don't know how to tell the application
where
my CHM file is. Application.Help(File,ID) doesn't do the job.
 
J

Jim Cone

It appears what you trying to do will Not work with .chm files only with .hlp files.
You can specify the .hlp file in the Initialize event of the form...
.... Application.ThisWorkbook.VBProject.HelpFile = "xxxx.HLP"
and the WhatsThis? feature will work to a degree.
It may be simpler and easier to add a "help" button on the form which opens your file.
--
Jim Cone
Portland, Oregon USA



"Mike" <[email protected]>
wrote in message
Application.Help will display my help file IMMEDIATELY, NOT when I cl;ick on
the desired control after clicking the "WhatsThis" HELP button in the Title
bar.
 

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