0

I use script to create c# dll from this topic: A Simple C# DLL - how do I call it from Excel, Access, VBA, VB6?

And when I call from Excel 2010 I get error:

Run-time error '429' ActiveX component can't create object

I test DLL and work when I call from .NET or DAX2009, but it does not work from Excel. Any idea?

Community
  • 1
  • 1
lukasz_k
  • 1
  • 3
  • Please post your code so we can see if there is anything in there that needs fixing. Both the code in your C# dll and your macro code. – Karl-Johan Sjögren Jan 28 '13 at 08:06
  • Post code is not needed because the problem is in office language. DLL run in English environment but not with my and my client language – lukasz_k Jan 28 '13 at 08:43

3 Answers3

1

Make sure your Excel's locale is set to en-us (basically the language is set to English). I had something similar and that was the fix for me...

Adi
  • 5,113
  • 6
  • 46
  • 59
  • Yep, but only work when I run DLL on ma virtual English machine with office. Change language on my local system doesn’t work. – lukasz_k Jan 28 '13 at 08:28
  • So when I register and test my DLL on English virtual machine all work correct. I create functionally for client and need run my DLL on Windows and Office with another language. What I must do, to run my DLL? – lukasz_k Jan 28 '13 at 08:41
0

So, I find solution. It is my fault. I register with 32 bit regasm.exe and use Office 64bit. When I register DLL with 64bit regasm.exe and use in 64bit Office then DLL work correct.

lukasz_k
  • 1
  • 3
0

it is all about 32 or 64bit

selecting correct target cpu solved the problem

see this link