Python Script Engine not created in MSScriptControl

743 Views Asked by At

I am trying to use Python from Excel 2003 by means of MSScriptControl. I followed all the steps required, as indicated on various topics here and elsewhere, such as:

  1. Installing ActivePython
  2. Adding Reference "MSScriptControl 1.0" to VBA in Excel
  3. Registering Python by launching the script C:\Python27\Lib\site-packages\win32comext\axscript\client\pyscript.py

but I cannot get my code to work on one PC (whilst working on another, where I followed the same steps as above).

Here's the code in VBA:

Global sc As New MSScriptControl.ScriptControl

Public Function calibrate()

 sc.Language = "python"

 sc.ExecuteStatement ("import SABRSolver")

End Function

when I execute the function, it stops at sc.Language telling me that "A script Engine for the specified language can not be created (Error 380)"

This is really driving me mad, since as said, it is working on other machines with the same setup.

Am I missing something else?

0

There are 0 best solutions below