View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tony C[_3_] Tony C[_3_] is offline
external usenet poster
 
Posts: 5
Default Setting the Help 4.0 file name and path in a locked project

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