How to pass parameter between vb.net forms

  • Thread starter Thread starter Melson
  • Start date Start date
M

Melson

Hi

Can anyone help me with my problem. I've created 2 forms. Each has a local
variable. How can I pass the st2 string in form2 to st1 in form1.

Example
form1:
dim str1 as string

form2:
dim st2 as string


Please help. Thanks

Regards
Melson
 
I'm not sure... do these forms have a parent form?
Does one launch the other?

Obviously you could have a

ReadOnly Public Property String1 as string
Get
 
Declare it as Shared.

Public Shared st2 as string

str1 = form2.st2

Or create a module and declare str1 and st2 in the module, then access from
either form.
 
Back
Top