Vbalearner85
Board Regular
- Joined
- Jun 9, 2019
- Messages
- 139
- Office Version
- 2016
- Platform
- Windows
Hi I am using below vba to run python script "Data.py" successfully and also run some others scripts "data1.py"etc parallelly via vba.
I am looking for vba which shall only kill/exit "Data.py" script and shall not kill/let other scripts keep running.
I am aware of kill method to exit python completly but looking for vba which shall only kill particular python script as mentioned above. Please advise
I am looking for vba which shall only kill/exit "Data.py" script and shall not kill/let other scripts keep running.
VBA Code:
Sub PyData()
ChDir "C:\Users\Desktop\Latest"
Call Shell("C:\Users\AppData\Local\Programs\Python\Python39\python.exe " & "Data.py", 1)
End Sub
I am aware of kill method to exit python completly but looking for vba which shall only kill particular python script as mentioned above. Please advise
VBA Code:
Sub KillPython()
Dim sKillExcel As String
sKillExcel = "TASKKILL /F /IM python.exe"
Shell sKillExcel, vbHide
End Sub