VB2005: get value from other form

K

Krishna

Hello,

Using VB2005 I have created two windows using design. Form2 has textbox. I
load form2 in form1 using form2.show. Now, how do I get from2's textbox
value.

in form1 form2.textbox1.text should get value right?

Please void showing examples with creating forms programmatically that
confuses even more.

Thanks
Kris
 
H

Herfried K. Wagner [MVP]

Krishna said:
Using VB2005 I have created two windows using design. Form2 has textbox. I
load form2 in form1 using form2.show. Now, how do I get from2's textbox
value.

in form1 form2.textbox1.text should get value right?

Yes, basically that should work.

\\\
Dim f As New Form2()
f.Show()
....
MsgBox(f.TextBox1.Text)
///
 
K

Krishna

Kerry,

That worked. But in my hasty I posted this 'coz I couldn't reference it in
debug mode (quickwatch). Sorry for that.
Can you tell why quickwatch cann't get the object?

Thanks,
Kris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top