If you declare a variable in your form, and try to access
it from other
form, you will see that the variable is not declared
in the second form, and
you can't get its value.
To overcome this problem, declare the variable
in Module:
Add 1 Module to your Project - From VB menu select
Project
-> Add Module, and click Open.
Then put the variable declaration in
the module.
But instead of using "Dim", Use "Global".
For
example:
Global Str As String
Global Num As Integer