ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Batch in excel (https://www.excelbanter.com/excel-programming/300938-batch-excel.html)

calculus87

Batch in excel
 
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

--
Message posted from http://www.ExcelForum.com


Chip Pearson

Batch in excel
 
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


"calculus87 " wrote
in message ...
Hello,
I have what I believe is an easy question. Is there a way from

excel's
VB to call batch files? If so, would you please show me how.

Thanks


---
Message posted from http://www.ExcelForum.com/




calculus87[_2_]

Batch in excel
 
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

--
Message posted from http://www.ExcelForum.com


Chip Pearson

Batch in excel
 
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



"calculus87 " wrote
in message ...
Interesting,
I am a bit new to this, so let me get this straight. You just

call
this command
Shell "H:\test.bat"

and it will execute the bat file?


---
Message posted from http://www.ExcelForum.com/




calculus87[_3_]

Batch in excel
 
This is very interesting. Thank

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com