Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute a file in vba

Status
Not open for further replies.

pazgb

Programmer
Jun 9, 2003
60
US
I have a help file system that i want to be executed on a button but I can't figure out the code to execute it.

Can anyone help?
 
Perhaps the SHELL() may be the answer? Personally, I create PDF's and create a Hyper-link. Another approach I have used is to have embedded objects within a table within the database and then have a Books-Online approach. htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Just assign the help file to the form's HelpFile property and in the button's Click event add:

[tt]
Private Sub cmdHelp_Click()
SendKeys "{F1}"
End Sub
[/tt]

You can use the API also if you're feeling more technical, but it will depend on whether your help file is HTML help or WinHelp.

VBSlammer
redinvader3walking.gif

[sleeping]Unemployed in Houston, Texas
 
my help file is HTML help and i set the helpfile property to my helpfile and left the helpcontextID to 0 which is default, but it still gives me Microsoft Access's helpfile.

any more options?
 
You'll need to provide a HelpContextID.

VBSlammer
redinvader3walking.gif

[sleeping]Unemployed in Houston, Texas
 
Im using HTML Help Workshop, do you know how to create helpcontextid's?
 
YUCK. Context sensitive help! Useful, but a pain in the ass to use!!

If all you need to do is open the hlp file, use the code in m FAQ:faq705-1971 and just pass it the name of the help file.

Cheers

Ben

----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
You just create a header file with a .h extension (add it to the 'Map' section on the HTML API Information dialog) and add your IDs like this:
Code:
#define IDH_BACKEND	1000
#define IDH_INSTALL	1001

Then you associate the IDs with specific .htm files using the 'Alias' tab on the dialog.
Code:
IDH_BACKEND=Content\BackendFiles.htm
IDH_INSTALL=Content\Installation.htm

That's it. The context IDs for this example 1000 and 1001



VBSlammer
redinvader3walking.gif

[sleeping]Unemployed in Houston, Texas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top