JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
Just wondering why I can a run bat file from the command prompt, but when I run
Sub RunPYScript()
it gives me a runtime error
I do run other external programs direct using the EXECCMD command and that works file, but running a bat file is throwing me.
Any assistance greatly received.
Just wondering why I can a run bat file from the command prompt, but when I run
Sub RunPYScript()
VBA Code:
Dim wsh As Object
Set wsh = VBA.CreateObject("WScript.Shell")
Dim waitOnReturn As Boolean: waitOnReturn = True
Dim windowStyle As Integer: windowStyle = 1
wsh.Run "C:\Users\jeff\Desktop\Betfair Bot\RUNPY.BAT", windowStyle, waitOnReturn
MsgBox "Wait for Data to Download"
End Sub
it gives me a runtime error
I do run other external programs direct using the EXECCMD command and that works file, but running a bat file is throwing me.
Any assistance greatly received.