Excel to Run a Batch File?!?

C

carla

Hi

I am running Office 2003. I have designed an excel spreadsheet using
various macros. I now need a macro designed that can run a batch file.
Is this possible?

Hope you guys can help!

Thanks Alot

Carla
 
G

Gord Dibben

Carla

Sub Run_Batch()
Dim taskID As Variant
On Error Resume Next
Shell ("C:\yourbatch.bat"), vbNormalFocus
If Err <> 0 Then _
MsgBox "yourbatch.bat is Missing"
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top