Click here to Skip to main content
15,562,222 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,,

VB
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
Updated 7-Aug-12 3:19am
v2
Comments
[no name] 7-Aug-12 7:42am    
You cannot. It's not an ActiveX DLL so it does not need to be registered.
ZurdoDev 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.
Maciej Los 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900