Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub RunPython()
- shellScript = "python Daily.py"
- Dim wsh As Object
- Set wsh = VBA.CreateObject("WScript.Shell")
- wsh.CurrentDirectory = Application.ThisWorkbook.Path
- Set wshSystemEnv = wsh.Environment("Process")
- Set WshShellExec = wsh.exec(shellScript)
- Range("C7").Value = WshShellExec.StdErr.ReadAll ' Show error, if any
- End Sub
Add Comment
Please, Sign In to add comment