Click here to Skip to main content
12,755,775 members (37,201 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#3.0 C# MS-Excel VBA

retVal = Shell("Regsvr32.exe c:\temp\comcslibrary.dll", 1)

I have the above statement in may vba code. And it giving me the error as....

c:\temp\comcslibrary.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered.

The particular dll has been developed in c#.Net And I need to invoke the function written in it, in my vba code. How to get rid of this error???
Posted 7-Aug-12 0:38am
Updated 7-Aug-12 3:19am
Wes Aday 7-Aug-12 7:42am
You cannot. It's not an ActiveX DLL so it does not need to be registered.
ryanb31 7-Aug-12 8:19am
Can't you just add it as a reference in VBA in project properties instead?
comred 8-Aug-12 3:03am
for my local machine it is fine. But what if, I distribute it among my clients in diferent location? they also need to go in tools-->Reference and then checking that dll right.. because of this my vba code may exposed to him. and I don't want it.
ChandraRam 8-Aug-12 7:00am
You will anyway need to distribute the DLL file. So long as Excel is able to find it in the path, it should work fine. Just add the function declarations your VBA project, with instructions when distributing, to place the DLL file in the same folder as the Excel file.
ryanb31 8-Aug-12 7:52am
As ChandraRam mentioned, you just need to include the dll because the project properties will be expecting the dll on the client machine also.
losmac 4-Sep-12 16:29pm
@ChandraRam, my virtual 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 7 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100