A VB6 DLL is an COM component, so you do not have to use the declare
statement. First you need to set a reference to your DLL in the References
dialog on the Project Menu. Then you can use the following code. First
declare a variable as the class in your DLL and then call the Thing
function.
'In Form1
Option Explicit
Public Sub Command1_Click()
Dim objMyDLL As New MyDLL.Class1
Text1.Text = objMyDLL.Thing
End Sub
You will also need to change the Class code. First I would make the
Function Thing Public so your project can see it. Next you need to declare
a return value for the Thing Function. Finally, say what to return (thing =
"HeyNow").
'In Class1.Cls
Option Explicit
Private Function Thing() as String
Thing = "Hey Now"
End Function
--
Matthew Arnheiter
Flash Creative Management
http://www.flashcreative.com