I have developed an Excel 97 application, and have developed a corresponding help (.HLP) system which features context-sensitive help.
While in the VBA editor inside Excel, I can associate a Help file by going in to Project Properties.
However, the spreadsheet will be given to other people, who may install it on a network share, secondary hard disk, etc.
I can not specify a hard-coded path in the Project Properties box, because I do not know that it will always be (say) C:\MYAPP\MYAPP.HLP.
So what do I do?
I've tried putting the spreadsheet on a different PC, and when the user tries to get Whats-This-Style help, the dialog appears asking for the user to locate the Help file.
> >I have developed an Excel 97 application, and have developed a > >corresponding help (.HLP) system which features context-sensitive help.
> >While in the VBA editor inside Excel, I can associate a Help file by > >going in to Project Properties.
> >However, the spreadsheet will be given to other people, who may install > >it on a network share, secondary hard disk, etc.
> >I can not specify a hard-coded path in the Project Properties box, > >because I do not know that it will always be (say) C:\MYAPP\MYAPP.HLP.
> >So what do I do?
> I would put the help file in the same directory as the workbook that > uses it. Then the help file is > ThisWorkbook.Path & "\MYAPP.HLP"
> Bill Manville > Oxford, England > Microsoft Excel - MVP
Bill I'm a little confused.
As you say, we are shipping the .HLP in the same directory as the .XLS. I have code in the Workbook open to check for the existence of the help file (IF THISWORKBOOK.PATH & APPLICATION.PATHEPARATOR & "MYAPP.HLP) and so am familiar with ThisWorkbook.Path method.
Are you saying that in Project Properties, Help File text box in the VBA editor, I can actually type in
ThisWorkbook.Path & "\MYAPP.HLP"
And it will evaluate it at runtime so that users installing the .XLS/.HLP into whatever directory will not have the problem mentioned in my original mail.
>As you say, we are shipping the .HLP in the same directory as the .XLS. >I have code in the Workbook open to check for the existence of the help >file (IF THISWORKBOOK.PATH & APPLICATION.PATHEPARATOR & "MYAPP.HLP) and >so am familiar with ThisWorkbook.Path method.
>Are you saying that in Project Properties, Help File text box in the VBA >editor, I can actually type in
> ThisWorkbook.Path & "\MYAPP.HLP"
>And it will evaluate it at runtime so that users installing the >.XLS/.HLP into whatever directory will not have the problem mentioned in >my original mail.
I'm the one who was confused. Didn't realise you were talking about the help file in the Project Properties box.