Sinisterly
Variables - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: Variables (/Thread-Variables)



Variables - 1llusion - 01-12-2011

Hey Smile

Wanted to ask, lets say I have 2 forms. One is configuration and other just counts with values from the configuration.

How do you take the variables from the 1 form to the other?

(I think its dead easy, but Im so exhausted that I cant think of it Biggrin)

Thanks!


RE: Variables - Coder-san - 01-12-2011

You need Public variables for this.

Form1
Code:
MsgBox(Form2.varOnAnotherForm)

Form2
Code:
Public varOnAnotherForm As String = "Hello"



RE: Variables - 1llusion - 01-12-2011

Thanks alot!!! Now, time to sleep (hurray!!!)
Smile