Very simple VB problem

jaydee

Diamond Member
May 6, 2000
4,500
4
81
The summary says it all. I don't really know VB, I just took some free code I found on the net and am modifying it to do what I need it to do. I've declared a string in one form, and I just want to call it up in another form. Just need the syntax to pass it through...

Thanks in advance,
Jim
 

nbarb99

Senior member
Mar 14, 2003
581
0
0
Declare the variable as Public in the first form, and you should be able to access it from the other form like so:

Form1.variableName
 

jaydee

Diamond Member
May 6, 2000
4,500
4
81
Thanks for the replies guys. tfinch2 was right. I had to define it as a global variable in a module within the project, and from there I was all set.

Thanks,
Jim