Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Setting the Help 4.0 file name and path in a locked project

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Setting the Help 4.0 file name and path in a locked project

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Setting the Help 4.0 file name and path in a locked project

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







  #5   Report Post  
Posted to microsoft.public.excel.programming
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










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Setting the Help 4.0 file name and path in a locked project

Thanks for the replies guys. My original post wasn't clear: sorry. I'm
talking about "What's This" help which cannot be implemented in a VBA form
using HTML help and it has do be done with WinHelp 4.0. I am already
implementing HTML help using API calls with button clicks accessing HTML
help file URL's. It is possible to simultaneously implement WinHelp 4.0
What's This help and HTML context Help. What you do is:

For the HTML Help: Use the API calls as you described.

For the WinHelp What's this help: Either assign the *.HLP file at compile
time in the Project Properties or at run time by setting the
Application.ThisWorkbook.vbProject.HelpFile property.

This works fine and the buttons do their thing and the question mark/right
click does its thing. This is only the case, however, if the Project is
not locked for viewing; if it is locked the call to the workbook VBProject
properties generates an error at run time.

I would prefer to do it dynamically for distributing my Addins but if the
Project is protected the call to the Project properties fails. I use an
installer rather than zip format for distribution and install into a
Programme Files folder so I could assume the default file location for
What's This help and disable it if the user choses to install in a different
folder but I'd like to be a bit more elegant than that. I thought about
unprotecting the Project in code but I guess that if that can be done it's
not generally publicised. Is there another way to assign the !?

Tony


"Bob Phillips" wrote in message
...
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










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
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
Project locked Tufail Excel Discussion (Misc queries) 1 July 10th 06 02:09 AM
Setiiing up file name & path as a default setting on all sheets/ta Paul Canal Excel Discussion (Misc queries) 3 March 31st 06 01:07 PM
Locked Macro Project Dennis Slattery Excel Discussion (Misc queries) 0 December 1st 05 02:17 AM
Assigning the Help 4.0 file path in a protected project Tony Seiscons Excel Programming 3 November 12th 04 05:20 PM


All times are GMT +1. The time now is 08:29 AM.

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

About Us

"It's about Microsoft Excel"