Hi,
Is there a special way you need to open Form2 from Form1 so that Form2 can access the variables declared in Form1?
Ie, i open Form2 from Form1 with:
dim frm2 as new Form2()
frm2.Show()
Then, within Form2, i access the public decalred variable (public var as string) with:
tbPassedVal.Text = frm1.var
The frm1 is declared within Form2 as:
dim frm1 as new Form1()
I can see the var from Form2, however, the value is passed as null, when in fact, it should be "BLAH".
Why is this happening? Could somebody please advise a solution that correctly passes the variable to Form2?
Thanks again,
Michelle

Is there a special way you need to open Form2 from Form1 so that Form2 can access the variables declared in Form1?
Ie, i open Form2 from Form1 with:
dim frm2 as new Form2()
frm2.Show()
Then, within Form2, i access the public decalred variable (public var as string) with:
tbPassedVal.Text = frm1.var
The frm1 is declared within Form2 as:
dim frm1 as new Form1()
I can see the var from Form2, however, the value is passed as null, when in fact, it should be "BLAH".
Why is this happening? Could somebody please advise a solution that correctly passes the variable to Form2?
Thanks again,
Michelle
