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

Opening a Specific File When Using Shell Function 1

Status
Not open for further replies.

HMJ

Technical User
Nov 29, 2002
58
0
0
US
We are trying to setup a button that would open a specific application (MSAccess) and a specific file. According to my reference books, this can't be done - but we all know books are not perfect.

Our current command line is:
Code:
    Call Shell(stAppName, 1)
Where stAppName = "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"

This works good so far, but we need the specific MDB (C:\MSAccess Files\Project 15698.MDB) to open. Anyone know how we can do this?

Thanks.

Harry Jessen
HMJessen@Yahoo.com
 
Have you tried this ?
stArgs=" ""C:\MSAccess Files\Project 15698.MDB"""
Call Shell(stAppName & stArgs, 1)

Hope This Help
PH.
 

PH:

THANK YOU!! It works great!



Harry Jessen
HMJessen@Yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top