已有一个Python脚本实现了部分功能,想使用VBA直接调用Python脚本Python脚本如下:[python] view plain copyimport time def hello(name): return "Hello, " + name + "!" print hello("World") #延时关闭windows控制台,使得用户可以看到运行结果 time.sleep(150); 方法如下:[python] view plain copy<pre name="code" class="vb">Sub test() Call Shell("C:\Python27\Python.exe C:\Users\Hongxing\Desktop\py2exe\Hello.py", vbNormalFocus) End Sub