r/visualbasic • u/Allegiance10 • May 06 '19
Global Variables Help
I’m working on small project for class right now, and I’m having nothing but issues getting global variables to work. What is the easiest way to do this? I have them declared on Form1 as Public and I’m trying to use them on Form2 in order to save a value, then use that value on Form1. Using VisualStudio.
Any help is greatly appreciated!
5
Upvotes
5
u/sa_sagan VB.Net Master May 06 '19
Put it in a module or class, not the form. I mean you can use the form, but preferred not to.