What do I have to do to make my DLL able to be registered

I have written a DLL in VB (not using MS visual studio)
I intend to use these function in Excel VBA

the code compiles without a problem but I can't register it.
I get the following message the dll was loaded but the entry-point dllRegisterserver was not found.

is there something in the code that I need to add to make this work?
weisscoachingAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MacroShadowCommented:
If it isn't a COM dll you can't register it.
weisscoachingAuthor Commented:
Thank you John.  I agree I wasted time following Kanti's links.

Marcoshadow: OK so I have what I think is a COM dll.  how can I use the Dll via VBA?
MacroShadowCommented:
OK so I have what I think is a COM dll
Is it or isn't it?

What language is the dll written in?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

weisscoachingAuthor Commented:
it is written in VB.

I have never done this before.
I used the editor "Microsoft visual Basic 2008 Express Edition"
I created a new project of type Class library and in it I add a module/class

the code looks like this:
Option Explicit On

Public Class Zakaut_calculations
    Public ReadOnly Property Zakaut_Kids_Point(ByVal NumberOfKids As Integer) As Integer
        Get
            Return Calculate_Kids_Points(NumberOfKids)
        End Get
    End Property

    Public Function Calculate_Kids_Points(ByVal intNumkids As Integer) As Long
        If intNumkids > 0 Then
            Select Case intNumkids
                Case 1
                    Calculate_Kids_Points = 350
                Case 2, 3, 4
                    Calculate_Kids_Points = (350 + ((intNumkids - 1) * 150))
                Case Is > 4
                    Calculate_Kids_Points = (800 + ((intNumkids - 4) * 100))
                Case Else
                    Calculate_Kids_Points = 0
            End Select
        Else
            Calculate_Kids_Points = 0
        End If
    End Function
    Public Sub New(ByVal NumberOfKids As Integer)
        MsgBox("Class started/ended", vbOKOnly, " ")
    End Sub

    Protected Overrides Sub Finalize()
        MsgBox("Class started/ended", vbOKOnly, " ")
        MyBase.Finalize()
    End Sub
End Class
MacroShadowCommented:
So your dll is written in vb.net, you have to use regasm.exe to register your assembly.

1. Open an elevated command prompt
2. Type the following command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\Users\MacroShadow\Desktop\Zakaut.dll /tlb:Zakaut.tlb

Open in new window

This is the format you should use, the above is just an example:
[path to regasm.exe] [space] [path to your dll] [space] [/tlb:] [desired name, you can use the dll name] [.tlb]
3. In the VBE add a reference to the tlb file

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
weisscoachingAuthor Commented:
Thanks I have made progress with these instructions.

I am still getting an error that the function I am calling is not defined. but I am at least one or two steps closer than were I was.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.