views:

112

answers:

0

I have just made an update to a dll that is called from VBA within Powerpoint. All development went fine, but when I tried to deploy on another users machine I get a problem that I have no idea how to debug.

What happens is that when the .Net object is created in the VBA, the reference that is returned is to the wrong object, so the next line fails with method not found.

Dim myObj As Foo.Bar

Public Sub RefreshData()

//'instantiate object
Set myObj = New Foo.Bar   
//'call a method
myObj.HelloWorld

The last line fails with Run-time error '438' Object doesn't support this property or method which is caused by the fact that myObj is somehow of type "Wrong.Type" instead of "Foo.Bar".

"Wrong.Type" is also in the assembly, so I assume something is going wrong with the type library, but I have tried regenerating (using regasm /codebase /tlb MyLib.dll), and this hasn't helped.

I don't know how to diagnose this any further. Hopefully someone out there can list some steps on how to diagnose this sort of problem?