views:

501

answers:

4

I saved my VB-Express code as .dll and registered it with regasm and made a .tlb file.

But when I try to run a function from it in an Excel-modul I get: Run-time error ‘453’: Can’t find DLL entry point RegisterServiceProcess in kernel32

What step did I miss?

A: 

Try this Microsoft Knowledge Base article: Can't Run Macro That Calls 16-bit DLL in 32-bit MS Excel.

Do you have the proper rights to access the DLL?

artur02
+1  A: 

I think you're creating a .Net dll and trying to call it from a COM-oriented environment (VBA), which isn't going to work without help. If I'm guessing right, then you need to investigate the COM Interop elements of .Net: Google throws up lots of promising-looking links, one of which is this article.

It looks a bit unpleasant, but I expect the nastiness can be tucked away somewhere...

Mike Woodhouse
Thanks Mike! Maybe its because I didn't copy it to the Global Assembly Cache that is mentioned in the artikel. Will try that tomorrow.
Florian
+2  A: 

See http://richnewman.wordpress.com/2007/04/15/a-beginner’s-guide-to-calling-a-net-library-from-excel/ or better still try out ExcelDNA ( http://groups.google.com/group/ExcelDna )

gobansaor
A: 

Thanks for the input to everybody, you helped me a big step further. After following the guides you provided I got: Run-time error: '-2147024894' (80070002)': File or assembly name AssemblyName, or one of its dependencies, was not found.

But I could fix that with this Workaround.

Florian

related questions