Call another program from excel


Posted by Jeramy on January 02, 2002 9:11 PM

Hi

Two questions:

1) I have a custom help file I just made. I want to put a menu item to call up the file. I know how to make the menu, but how can I tell vb to open the file (myhelp.hlp). I dont want excel to try to open it itself since it isnt an excel file, just have excel tell the program to open itself. Is this possible?

2) With the help file it opens with F1 when I have a userform open, but when I dont it goes to normal excel help. Is there any way that I could give my help file priority to open when F1 is pressed instead of excels help, and then when my program closes priority would go back to the normal excel help file.

I dont know if either of these are possible, but any help would be appreciated.

Thanks

Posted by Ivan F Moala on January 02, 2002 9:53 PM

1) Application.Help "C:\ExcelFiles\Help\Macrofun.hlp"

2) In the Thisworkbook object module place this
code;

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Restore_F1
End Sub

Private Sub Workbook_Open()
Change_F1
End Sub


In a standard Module place this code;

Sub Change_F1()
Application.OnKey "{F1}", "myhelp"
End Sub

Sub Restore_F1()
Application.OnKey "{F1}"
End Sub

Sub myhelp()
Application.Help "C:\ExcelFiles\Help\Macrofun.hlp"
End Sub

Now with your workbook open help diverts to your
help file....you MUST close the workbook to reactivate
the STD help file OR run the Restore_F1 routine

HTH

Ivan

Posted by Jeramy on January 02, 2002 10:45 PM

Worked Like a charm. Thanks!!!

Thanks

Posted by Ivan F Moala on January 02, 2002 11:17 PM

Re: Worked Like a charm. Thanks!!!

Just out of curiosity what did you use to make
your help file as there are a number of help
file generators, the older typ .hlp and the
.chm file type.


Ivan : 1) Application.Help "C:\ExcelFiles\Help\Macrofun.hlp" : 2) In the Thisworkbook object module place this

Posted by Jeramy on January 02, 2002 11:27 PM

Re: Worked Like a charm. Thanks!!!

I used Microsoft Help Workshop and a shareware program called HelpBreeze3.0 Its a shareware that is good for 21 days but it is completely functional and it only took a couple days to finish the file. I havnt seen any freeware/fully functional shareware to make chm files. I found one that pasted their url all over the file after it was compiled unless you register for like $99 or whatever so it was completely worthless to me. Thanks for the help, and if you know a good chm file let me know.

TTFN
Jeramy Just out of curiosity what did you use to make



Posted by Ivan F Moala on January 02, 2002 11:39 PM

Thanks......thats great

TTFN