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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macro to open excel file (no hyperlink)

Status
Not open for further replies.

Allilue

Technical User
Sep 14, 2000
189
GB
i have a form where i have a table of contents listed in a subform. right now, i'm using hyperlinks to link the records to excel files. can i do the same thing without the use of hyperlinks? i want instead to be able to select a record in the subform, then click a button to go to the proper excel file. i want to write a macro for this. is there a way to do this?

allison
 
Allison,

You could use the RunApp action in a macro, and on the command line include the XL file name that you want to retrieve.

The syntax is the full path name to the MS Excel exe followed by a space and the file name that you want.

I hope this helped,

Steve : ) [sig][/sig]
 
Thanks, I'll try that! Now if I have a subform listing various records, and I want the user to click on a record, then click on a common button that points to a file, the RunApp macro command will work only if all records are going to the same file. however, is there something that can be done to go to a specific file depending on the record highlighted, although using the same "View File" button? I guess the button will first have to read which record is selected, then go to a specific file depending on the record.

Help!

Allison [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top