Results 1 to 2 of 2

Thread: Com Error Help needed

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    1

    Com Error Help needed

    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.

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Com Error Help needed

    what is the error?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width