Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA 2003 Addin trying to map Context id to .chm file

Hi,



This is my first ever post. I'm trying to create context sensitive support
for my Excel userform to a chm file I've created in HTML workshop and keep
getting the following error:



"The C:\filename.chm file is not a Windows Help File, or the file is
corrupted."



My aim is to use no code and simply to match the field in my userform to the
help file by the user pressing F1 in my addin.



The mapping looks correct between Helpmatic Pro and Excel, I've set the
(Excel) Project properties help file name as the chm file I've compiled and
left the Context ID as 0. In my userform, I've correlated the various
textboxes and combolists to Help Context ids of 20,000 or more and checked
that this mapping is correct. This returns the above error.



I've done some research on this. I can confirm that hh.exe maps to chm files
in Folder Options. There is no unblock properties in properties of the file.
I've renamed the hh.dat file in my profile to generate a new copy. The help
chm file is on my local drive. I've tried this on a colleague's machine with
the same error. I've tried opening the file through cmd line, the chm file
displays without error but as soon as I specify the context id the window
does not display.



Is there a security update that could be causing the issue? If anyone has
any ideas I would be most appreciative.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Excel VBA 2003 Addin trying to map Context id to .chm file

I've never found a way to do what I think you are trying to do, at least not
calling the chm with F1 in a form though it is possible to map a chm to the
function wizard help button for UDF's.

AFAIK in a form the only way is to call the help API, eg

Private Declare Function HTMLHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal
hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal
dwData As Any) As Long

Const HH_DISPLAY_TOPIC = &H0
Const HH_HELP_CONTEXT = &HF

Private Sub CommandButton1_KeyDown( _
ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyF1 Then

gnHHwin = HTMLHelp(0&, sHelpFile, HH_HELP_CONTEXT, 20100&)
End If
End Sub

It's a bit of a learning curve I'm afraid but it's all out there. This just
to set you looking in the right direction.

Regards,
Peter T

"Stevo5858" wrote in message
...
Hi,



This is my first ever post. I'm trying to create context sensitive support
for my Excel userform to a chm file I've created in HTML workshop and keep
getting the following error:



"The C:\filename.chm file is not a Windows Help File, or the file is
corrupted."



My aim is to use no code and simply to match the field in my userform to

the
help file by the user pressing F1 in my addin.



The mapping looks correct between Helpmatic Pro and Excel, I've set the
(Excel) Project properties help file name as the chm file I've compiled

and
left the Context ID as 0. In my userform, I've correlated the various
textboxes and combolists to Help Context ids of 20,000 or more and checked
that this mapping is correct. This returns the above error.



I've done some research on this. I can confirm that hh.exe maps to chm

files
in Folder Options. There is no unblock properties in properties of the

file.
I've renamed the hh.dat file in my profile to generate a new copy. The

help
chm file is on my local drive. I've tried this on a colleague's machine

with
the same error. I've tried opening the file through cmd line, the chm file
displays without error but as soon as I specify the context id the window
does not display.



Is there a security update that could be causing the issue? If anyone has
any ideas I would be most appreciative.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 Context menu handle [email protected] Excel Discussion (Misc queries) 3 June 4th 07 02:48 PM
how to use .xla -- addin file -- Office 2003? Rich Excel Programming 1 December 27th 06 01:21 AM
addin for analysis tool pak for excel 2003 ppp Excel Discussion (Misc queries) 1 October 22nd 06 09:36 AM
addin for analysis tool pak for excel 2003 ppp Excel Worksheet Functions 1 October 22nd 06 06:41 AM
Excel 2003 No Context Help Newsgoups Excel Discussion (Misc queries) 0 November 2nd 05 12:19 PM


All times are GMT +1. The time now is 07:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"