Batch in excel

C

calculus87

Hello,
I have what I believe is an easy question. Is there a way from excel'
VB to call batch files? If so, would you please show me how. Thank
 
C

Chip Pearson

You can Shell to the bat file. E.g.,

Shell "H:\test.bat"



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
C

calculus87

Interesting,
I am a bit new to this, so let me get this straight. You just cal
this command
Shell "H:\test.bat"

and it will execute the bat file
 
C

Chip Pearson

Yes, you can call the Shell method, passing it the name of the
bat file, and it will execute the bat file immediately. Note that
execution will immediate proceed to the line of code following
Shell, without waiting for the bat file to complete.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top