Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm writing a macro within excel and in that macro I would like to run a batch file. Could somebody please help me with the syntax?
Thanks

Hey, simple bit of code here!!
in the macro, where you want to run the batch file, simply type:
Dim ReturnValue
ReturnValue = Shell("C:\FilenameOfBatch.bat",vbNormalFocus)You can replace the vbNormalFocus for whatever you wish, so you can have it so that it is hidden, minimised, maximised etc, after you press the ',' key it will popup a menu and you can pick from that.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |