borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (VB PopupMenu Problem with ActiveX)Next Topic (passing objects in ocx control) New Topic New Poll Post Reply
AndreaVB Forum : ActiveX : Passing values from a FORM to a usercontrol (both of them are in thesame activex project)
Poster Message
Nick2k3
Level: Big Cheese

Registered: 23-11-2003
Posts: 25

icon Passing values from a FORM to a usercontrol (both of them are in thesame activex project)

how do you pass values coming from a TEXTBOX in a FORM to a TEXTBOX in a USERCONTROL. Both objects are in the same activex project. No doubt i can pass values from usercontrol to a form, but how do i do it the otherway around.

i have tried this in my FORM

dim setfrm as myusercontrolname

setfrm.mytextbox.text = "My Message"

this code gives me an error
"object variable not set" or something like that....

please give me an idea..

thank you...

____________________________
Error 404 ...File not found...!!!!

11-10-2005 at 06:43 AM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 1052
icon Re: Passing values from a FORM to a usercontrol (both of them are in thesame activex project)

Hi,
You need to expose the control in your usercontrol as a property of it.
Example project attached:


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

____________________________
Attached:
uc_text.zip 2 KB (Downloads: 15)

12-10-2005 at 12:30 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : ActiveX : Passing values from a FORM to a usercontrol (both of them are in thesame activex project)
Previous Topic (VB PopupMenu Problem with ActiveX)Next Topic (passing objects in ocx control) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder