I'm trying to run a Python script from Excel using this VBA script.
Sub Plot()
ChDir "M:\Tools and Utilities\ColorScout\ColorScout Data Parser\src"
Shell "C:\Anaconda3\python.exe M:\Tools and Utilities\ColorScout\ColorScout Data Parser\src\Main.py", vbNormalFocus
End Sub
Pretty basic.
However, it's failing on the second line. I get an error message from Python that M:\Tools is not a directory.
What I think is happening is that the spaces in "Tools and Utilities" aren't being recognized. How can I get Python to recognizes Tools and Utilities as a directory? Putting Tools and Utilities in quotation marks raises a syntax error in VBA.
Hope this makes sense. Thank you!
"C:\Anaconda3\python.exe ""M:\Tools and Utilities\...\Main.py"""