gr44gs


I want to run a simple batch file (runBFI.bat) in excel. How do i get vba to pause while the batch file is running. I can get the batch file to start, I think.

Sub Run()
'
' Macro2 Macro
'

Call Shell("W:\Work\BFI\BFIResults\Copy2of05455100b\runBFI.bat", vbNormalFocus)


'
End Sub




Re: run a batch file with excel

Andy Pope


Hi,

See Chip Pearson's page on ShellAndWait
http://www.cpearson.com/excel/shellandwait.htm






Re: run a batch file with excel

gr44gs

Sub Run()
'
' Macro2 Macro
'

Call Shell("W:\Work\BFI\BFIResults\Copy2of05455100b\runBFI.bat", vbReadOnly)


'
End Sub