3

I am trying to call a python function in a .py file in VBA.

I use this command to open the python shell :

Pathctrl = "C:\users\test\Desktop"
ChDir Pathctrl
Call Shell(Pathctrl & "\anaconda_python.bat ", vbNormalFocus)

I don't know how to write a VBA command to run a specific function within a python shell.

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
Bee
  • 31
  • 1

1 Answers1

2

This is a VBA question (and not related to Python).

According to @Ripster, in Execute a command in command prompt using excel VBA, you can call a Script with Call Shell(...).

Community
  • 1
  • 1
Laurent LAPORTE
  • 21,958
  • 6
  • 58
  • 103
  • Thanks, in my Python script, I have different defined functions, I just don't know how to call one of those defined functions within vba. – Bee Jan 17 '16 at 02:08