This is indeed a very simple example of a dll, and it would be rather silly to use a dll for this purpose. It's only to show you the process. And I'm not especially experienced with this. But we'll all have to start somewhere ;)
In VB6 add a new ActiveX DLL and name it TC1 in the properties window.
This is the code for the class:
'-------------------
Option Explicit
Private m_FName As String
Private m_Lname As String
Public Property Let FirstName(First As String)
m_FName = First
End Property
Public Property Let LastName(Last As String)
m_Lname = Last
End Property
Public Property Get BothNames() As String
BothNames = m_FName & " " & m_Lname
End Property
'--------------
From the Project menu select Project1 Properties (Bottom last menu item) and as Project name enter: projTC1
Then select File - Make ProjTC1.dll and remember where the dll is placed, e.g. Desktop.
Close
VB and Open Excel, open a new Workbook and from VBEditor add a module to this.
Open Tools-References and select Browse. Browse to your Desktop and select the new projTC1.dll.
Make a Sub like this:
Option Explicit
Sub test1()
Dim TC As TC1
Set TC = New TC1
TC.FirstName = Cells(1, 1).Value
TC.LastName = Cells(1, 2).Value
Cells(1, 3).Value = TC.BothNames
Set TC = Nothing
End Sub
Now enter your firstname in A1, lastname i B1 and run the macro. You should see your full name in C1.