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!

How do you run a batch file using VB code??

Status
Not open for further replies.

nyx

Programmer
Jul 25, 2004
20
0
0
AU
Hi,

me again... I'm having trouble executing a batch file using VB code in Access...

I've attempted to use the Shell() function but it keeps telling me that its an invalid procedure call... seems to work fine for .exe's but when I put in a .bat file to execute it gives me the error...

any ideas?
 
hi,

well, this is an update to my question....

i figured out that its my parameter that is causing the trouble.

my batch file accepts one parameter. the problem is that the parameter must be enclosed in quotes in order to execute properly. However when I construct the string to pass to the Shell() function, I guess it doesn't like so many double quotes in the string and gets annoyed...

I haven't found a work around for it as yet...

anyone have any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top