Here is the
Project Name:- Test2
Class Name:- Com2
--------------------------------------------------------
Dim sName As String
Public Property Get Name() As Variant
Name = sName
End Property
Public Property Let Name(ByVal vNewValue As Variant)
sName = vNewValue
End Property
Public Function ReturnName() As String
ReturnName = "1234567"
End Function
--------------------------------------------------------
I have register in my Component Services.
Here is the Code in my application
--------------------------------------------------------
Option Explicit
Private Sub Form_Load()
Dim dsServer As New DataSpace
Dim dfServer As Object
Dim sTest As String
Set dfServer = dsServer.CreateObject("Com2.Test2", "http://localhost/")
sTest = "Name1"
dfServer.Name = sTest 'Here is the error comes out
MsgBox dfServer.Name
MsgBox dfServer.ReturnName
End Sub
--------------------------------------------------------
It seem that I cannot assign a value to my Name Property. My Function runs
fine returning the value of "1234567". Just don't where it goes wrong. Any
comment is appreciatated.
Thanks in advance.
