Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / April 2005

Tip: Looking for answers? Try searching our database.

Using Shell Command

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gibson - 29 Apr 2005 19:11 GMT
Using a Access2003 database in WinXP I am trying to shell over to a third
party software to run it. I am using the code line.
Dim Test
Test = Shell("C:\Directory\File.EXE Config1.XXX")

The 3rd party software is installed in the same directory as the database.
The problem is when the File.Exe runs it looks for other files to load and
claims it can't find them. It claims it can't find file Config1.XXX when it
is there. Apparently File.exe thinks it is running somewhere else than in
its directory. When I create a shortcut on the desktop to run the File.EXE
it works fine.  Is there a way to shell to a desktop shortcut? I'd rather
not have my clients have to alt-tab out of the database to the desktop to
run this program

Thanks
Klatuu - 29 Apr 2005 19:47 GMT
Look at the command line in your short cut to see if there are any command
line options included.  If there are, you will have to add them to your shell
statement.  What does this File program do, anyway?

> Using a Access2003 database in WinXP I am trying to shell over to a third
> party software to run it. I am using the code line.
[quoted text clipped - 11 lines]
>
> Thanks
Douglas J. Steele - 29 Apr 2005 22:43 GMT
It's more likely that the short cut has its Start in property set to the
folder. If that's not done, then you really can't be sure where the program
is going to look for the file.

Easiest will probably be:

Test = Shell("C:\Directory\File.EXE C:\Directory\Config1.XXX")

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Look at the command line in your short cut to see if there are any command
> line options included.  If there are, you will have to add them to your
[quoted text clipped - 20 lines]
>>
>> Thanks
Douglas J. Steele - 30 Apr 2005 01:07 GMT
It occurred to me that your sample name may be misleading. If, in fact,
there are spaces in the full path, you'll need to do something like:

Test = Shell("""C:\Directory\File.EXE"" ""C:\Directory\Config1.XXX""")

That's 3 double quotes at the beginning and end, and two sets of double
quotes with a space in between in the middle.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> It's more likely that the short cut has its Start in property set to the
> folder. If that's not done, then you really can't be sure where the
[quoted text clipped - 33 lines]
>>>
>>> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.