Solved

DllRegisterServer entry point was not found

Posted on 2013-01-19
6
905 Views
Last Modified: 2013-01-22
Hello Experts,
let me tell you that before ask a new question I read the other question based on same subject. I understand few things, but I guess I missing the main point.

I create a very simple dll via Visual Studio I tried in C# and in VB but same results.
This class is very simple it return a String with "Hello World"

When I compiled with no error I go in the folder I take the file.dll I copy in another folder an I open Excel VBA and in the Reference I try to add that library as dll and there I got the first error, so I thought that I have first to register so I tried via regsvr32, using regasm in both cases I got back error, using regsvr32 I got back the error that is in the topic of this post.

So basically let say as other experts replyed that maybe the dll is not meant to be registerd, anyone can then explain me how can I use it in Excel VBA?
0
Comment
Question by:gokyo66
  • 3
  • 3
6 Comments
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 38797209
To use a dll from VBA it needs to be COM visible so it can interact properly.  This is not too difficult but a bit fiddly - this article is one of many that gives instructions (Google for others): http://msdn.microsoft.com/en-us/library/vstudio/bb608604.aspx
0
 

Author Comment

by:gokyo66
ID: 38800326
Hi andrewssd3,
thank you for your reply, Im just making some test.

Acutally it seems more easy than what described in your link. I just compiled my project with the flag "Register for COM interop" so when compiled I got now a file .tlb.

When now I go in Excel VBA I can import without error the reference, I can as well create a variable of this type, I got back now another error "Runtime error 429"
0
 
LVL 17

Assisted Solution

by:andrewssd3
andrewssd3 earned 500 total points
ID: 38800677
I think you do need to follow all the suggestions - that error is a COM error - see: http://support.microsoft.com/kb/828550
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:gokyo66
ID: 38801510
Well I tried as well with the info on the new link but still I got back the error 429 --- don't know... I don't get how a so simple thing get so complicated and annoyoing... anyway
0
 
LVL 17

Assisted Solution

by:andrewssd3
andrewssd3 earned 500 total points
ID: 38804507
Yes - difficult to help without being able to see what you're doing.  I have done this before by following instructions found on the web - can't remember exactly which one, but here's another: http://stackoverflow.com/questions/1170794/a-simple-c-sharp-dll-how-do-i-call-it-from-excel-access-vba-vb6.  You could do some more googling...
0
 

Author Comment

by:gokyo66
ID: 38804526
Hi andrewssd3,
you know what... you're right, actually I was a little in hurry to do something so at the end I create a virtual machine I installed window XP and then Visual Studio a version of the 1999 with Visual Basic 6 I created a DLL and works perfectly, no registration needed, just put the dll in the folder of the Excel programm I did.

Now said that is pretty a pity if not sad, that I had to do that to solve my problem, in any case I will follow again your precious instruction, maybe with less pressure I can see better and read better.

So basically I accept your first solution, and I thank you very much for your support

Best Regards
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
excel pivot question 4 40
Hiding column macro 10 28
FormulaArray VBA Issue 6 17
Get Client IP on RDS - VB.NET 15 27
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now