modules in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • willywonka
    New Member
    • Sep 2007
    • 18

    #1

    modules in vb.net

    hello all i have a beginner question,

    i am using vb.net and wanted to know that if i declare a variable in a module and assign that variable to a textbox in a form(say form1), when i try to access that variable in another form(say form2) should i be able to get the value. i don't know if i doing something incorrectly b/c when i try to get the value of the variable in the 2nd form it shows up as an empty string even though i assigned it to a textbox in form 1 and entered in a value.

    Thank you for any help!
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by willywonka
    hello all i have a beginner question,

    i am using vb.net and wanted to know that if i declare a variable in a module and assign that variable to a textbox in a form(say form1), when i try to access that variable in another form(say form2) should i be able to get the value. i don't know if i doing something incorrectly b/c when i try to get the value of the variable in the 2nd form it shows up as an empty string even though i assigned it to a textbox in form 1 and entered in a value.

    Thank you for any help!
    if you declare a Public variable in Module and assign it to the TextBox value in Form1 then you should get the value of that variable in Form2.

    if you are not getting then please post your code....

    Comment

    Working...