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
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