I referred to the answers given here - How to call python script on excel vba? But it didn't work for me.
I simply see a screen flash before me and the Python script simply does not run. The Python Script I am writing is in Spyder, and has multiple modules referenced to it.
This is the code I am writing :
Sub RunPythonScript()
Dim objShell As Object
Dim PythonExePath As String, PythonScriptPath As String
ActiveWorkbook.Save
ChDir "C:\path\where\.py\file\is\saved"
Set objShell = VBA.CreateObject("Wscript.Shell")
PythonExePath = """C:\path\where\python.exe\exists"""
PythonScriptPath = """C:\path\where\.py\file\is\saved"""
objShell.Run PythonExePath & PythonScriptPath
Application.Goto Reference:="RunPythonScript"
objShell.Popup "Your results are now processed", , "Attention!"
End Sub