|
-
Aug 14th, 2002, 09:56 PM
#1
Thread Starter
Member
How do you reference pre-existing objects from a DLL
Desperate, need Help! I can't figure out to reference an already created object.
Here's what I did. I created a DLL with a form(frmWsk) and a class module (Smtp).
I defined a bunch of public properties and one method in my class:
'Class module(Smtp.cls) in Active X DLL
Private ServerData As String
Public Property Let Server(ByVal Data As String)
ServerData = Trim(Data)
End Property
Public Property Get Server() As String
Server = ServerData
End Property
'a bunch more and then my method
Public Sub Sendmail()
frmWsk.Form_Load
End Sub
'Form (frmWsk.frm) in Active X DLL
Private Test As Smtp
Public Sub Form_Load()
Set Test = Smtp
Msgbox Test.Server
End sub
'Code calling compiled Active X DLL
Public Smtp As Smtp
Sub main()
Set Smtp = New Smtp
With Smtp
.Server = "test.com"
.Sendmail
End With
I get error 424 object required. How do should I reference the object created in code calling the DLL?
End Sub
Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|