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!

call a batch file from an Access module 1

Status
Not open for further replies.

SlakeB

MIS
Jun 15, 2005
40
0
0
US
How can I do this? I know how to call a .vbs file:

Call Shell("wscript.exe " & "myVBS.vbs", vbMaximizedFocus)



How can I call a .bat file instead?
 
Call Shell(Environ("COMSPEC") & " /C myBAT.bat", vbMaximizedFocus)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Shell should recognise known file types so:

Shell myBAT.bat

or

Shell myBAT.bat, vbMaximizedFocus

would be sufficient


Out of interest PHV, why would you want to use /C and vbMaximizedFocus - in fact, why use vbMaximizedFocus at all when running a Batch File?

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top