def Add(self,a,b): return a+b
def Mul(self,a,b): return a*b
if __name__ == '__main__':
import win32com.server.register
win32com.server.register.UseCommandLine(Example)
---------------------------------
connecting to this COM server works with following VBS-script:
---------------------------------
Set ex = CreateObject("MyPython.Example")
msgbox ex.Add(1, 2)
---------------------------------
when i run following VBA script in excel
---------------------------------
Sub Testit()
Set ex = CreateObject("MyPython.Example")
MsgBox ex.Add(1, 2)
End Sub
---------------------------------
i get the error:
Run-time error '-2137024770 (8007007e)':
Automation error
The specified module could not be found
Any ideas what the problem could be?
Already searched a long time for solutions but did not find any....
thanks,
diego
Warning with lower/uppercases!
Try to make two versions of your methods (ex.: "add" & "ADD"), for study.
@+
--
MCI
The error comes already at the first line of Excel/VBA code:
Set ex = CreateObject("MyPython.Example")
rgds,e