I am trying to run my Python script from an Excel VBA macro. Originally I did not have an issue because the .py file was in the same directory as the excel file. Now we would like to store the .py file in a different directory and the macro produces an error.
Original Macro:
RunPython ("import pythonefile; pythonfile.get_data()")
I would like to do something like the following, but am not sure how to change the directory that the macro imports the .py file from.
ChDir "C:\"
RunPython ("import pythonfile; pythonfile.get_data()"