global variable

vb6 Grenada
  • 14 years ago

    i have 2 modules ,i have declared a global variable in one module ,i want to access it in another module is it possible in VB, if possible how to do this in VB

    Thank u in advance

  • 14 years ago

    Hi Harish
     It's possible in VB6 also.
     U declare a variable in any one module.

     Public gstrUserName as String

     I hope this will solve ur problem
     Hari K

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson