View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Setting the Help 4.0 file name and path in a locked project

Tony,

I was going to respond that whilst VBA may not directly support calling help
with context ids, it can be achieved with Win APIs. That is exactly what is
demonstrated in the post that Peter has referred you to, so take a look at
it.

HTML Help is a big improvement IMO, so stick with it. You can also see an
example add-in at

http://www.xldynamic.com/source/xld.QDEDownload.html

Peter,

No I hadn't seen that follow-up, but I have now ... thank-you!

Bob

"Peter T" <peter_t@discussions wrote in message
...
Tony,

Bob was good enough to reply to a related question of mine that you might
want to take a look at:

subject: MyHelp.chm ????
http://tinyurl.com/6t2f6

and Bob, hope you saw my "late" thanks.

Regards,
Peter

"Tony C" wrote in message
...
Bob
Sorry, I wrote the post from memory. The line of code I am using is:

Application.ThisWorkbook.VBProject.HelpFile = ThisWorkbook.Path & "\" &

_
gsHELPDIRECTORY & "\" & gsCONTEXTHELPFILE

This works if the project is not Protected (Locked for Viewing) but does

not
if it is.
Activeworkbook or ThisWorkbook do not have HelpFile properties for

assigning
the
WinHelp 4.0 file name. You can assign it by right clicking the project

in
the IDE,
selecting VBA Project Properties and assigning the help file and path

there
but
I need to assign it dynamically so that I can distribute the addin.
I am using HTML with URLs to call a number of HTML files for general

help
but as VBA does not support HTML context help I am using WinHelp 4.0
for this.


Tony


"Bob Phillips" wrote in message
...
Why are you using the vbProject? Would Activeworkbook, or ThisWorkbook

not
do what you want?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tony C" wrote in message
om...
To use context help (Whats this help) in an Excel VBA form I can
assign the help 4.0 file name and path using

Activedocument.vbProject.helpfile = <file name and path

However this doesn't work if the project is locked or protected as

the
vbProject properties are protected. How can I do this with a
protected project?

(Note: this was posted yesterday but the return e-mail address was

an
old one that had been canceled).

Tony C