Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 Excel VBA
Hello,,

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
comred1.2K
Edited 7-Aug-12 3:19am
(no name)136.9K
v2
Comments
Wes Aday at 7-Aug-12 7:42am
   
You cannot. It's not an ActiveX DLL so it does not need to be registered.
ryanb31 at 7-Aug-12 8:19am
   
Can't you just add it as a reference in VBA in project properties instead?
comred at 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 at 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.
losmac at 4-Sep-12 16:29pm
   
@ChandraRam, my virtual 5!
ryanb31 at 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.

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

  Print Answers RSS
0 /\jmot 230
1 Zoltán Zörgő 210
2 Peter Leow 145
3 Sergey Alexandrovich Kryukov 115
4 _Asif_ 108
0 Sergey Alexandrovich Kryukov 9,353
1 OriginalGriff 6,881
2 Peter Leow 4,577
3 Zoltán Zörgő 4,129
4 Richard MacCutchan 2,882


Advertise | Privacy | Mobile
Web03 | 2.8.150129.1 | Last Updated 7 Aug 2012
Copyright © CodeProject, 1999-2015
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