VB2005: get value from other form

  • Thread starter Thread starter Krishna
  • Start date Start date
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
 
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)
///
 
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
 
Back
Top