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

Opening an Excel spreadsheet

Status
Not open for further replies.

JPinter

Technical User
Aug 15, 2002
9
US
Does anyone know a command that will open an excel spreadsheet file.
 
To open an Excel session the code is:
Call Shell("""F:\Program Files\Microsoft Office\Office\EXCEL.EXE""", 1)

Where you will need to put in your route to excel.exe

In order to open a specific file use:
Call Shell("""F:\Program Files\Microsoft Office\Office\EXCEL.EXE"" ""C:\My Documents\excelprog.xls""", 1)

You should be able to put your route to the file into the second example.

If you don't want to code then these can be put in macros with the action as runap and the command line below as :
"F:\Program Files\Microsoft Office\Office\EXCEL.EXE" "C:\My Documents\excelprog.xls"

good luck

Telephoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top