DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links