Activex Component Run time error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Activex Component Run time error

Hybrid View

  1. #1
    KENHOW Guest

    Activex Component Run time error


    I am learning how to use ActiveX Components and I can't get pass a Run Time
    Error 424 "object required". Below code is from a Macmillan Computer Publishing
    book.

    ...add the following procedure code:

    Public Property Get AddressText() As String
    Dim s As String
    s = txtName & vbCrLf
    s = s & txtStreet & vbCrLf
    s = s & txtCity & vbCrLf
    s = s & txtState & vbCrLf
    s = s & txtZip
    AddressText = s
    End Property

    I have a typical project group consisting of the ActiveX component itself
    plus a test project (a Standard EXE project). I ran the project, added data
    to the components, press Ctrl+Break, then Ctrl+G and type print AddressCtrl.AddressText
    but the property never gets called. I added option explict and it still
    didn't work. Any help would be appriecated.

    Kenneth Howell Jackson Hewitt Multimedia Department

  2. #2
    NING Guest

    Re: Activex Component Run time error


    Hello, I am suspecting that you should declare that 'S' at mudule level.

    -NING


    "KENHOW" <janus_v@hotmail.com> wrote:
    >
    >I am learning how to use ActiveX Components and I can't get pass a Run Time
    >Error 424 "object required". Below code is from a Macmillan Computer Publishing
    >book.
    >
    >...add the following procedure code:
    >
    >Public Property Get AddressText() As String
    >Dim s As String
    >s = txtName & vbCrLf
    >s = s & txtStreet & vbCrLf
    >s = s & txtCity & vbCrLf
    >s = s & txtState & vbCrLf
    >s = s & txtZip
    >AddressText = s
    >End Property
    >
    >I have a typical project group consisting of the ActiveX component itself
    >plus a test project (a Standard EXE project). I ran the project, added

    data
    >to the components, press Ctrl+Break, then Ctrl+G and type print AddressCtrl.AddressText
    >but the property never gets called. I added option explict and it still
    >didn't work. Any help would be appriecated.
    >
    >Kenneth Howell Jackson Hewitt Multimedia Department



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center