Variable not being remembered
I've worked out what's wrong now,
in Private sub form_load it gets and sets the currentcomputername variable but by the time we get to sub form_unload, it's forgotten it :(
How can I make my app remember it from one form to another?
Thanks all
Simon
Try Global (Public) Declaration of Variable
Hey Simon,
Add a module to your project and add the following line of code:
Code:
Global CurrentComputername as String
By adding a module and declaring the variable Global (Public in VB6, I think), it allows your program to use whatever is saved in your variable anywhere in your project.
Hope that helps.
Let us know,
JazzBass