Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Declaring a Global (Public) variable in VB
Hello, I am new to VB, but have experience in a lot of other languages. I am having trouble correctly declaring a global variable in VB. I get a value in one form and i later want to use that same value in another form. I thought i could just use:
Public fullpath as String
at the top of the form page and then continue to use this variable anywhere else i wanted in the project, but that isn't the case. Does a global variable have to be declared in a module instead of a form? I know this is probably very easy to do, but i'm having trouble with it. Any help is greatly appreciated.