It's easiest to do by saving them into a simple ascii file.
If you know the maximum length of your variables, use a binary file. (I like to try and keep my numeric variables below 255, and use numeric variables whenever possible. This way you can use a single ASCII code as the value of the variable, and keep your variable files TINY, but I'm getting off subject.)
However, for variable length variables, the standard input-output file is simple enough.
Pretend that you have two variables, txtFirstName$ and txtLastName$ that you want to recover next time. All you have to do is the following:
'Open a file to store your variables in.
OPEN "TempVars.TXT" FOR OUTPUT AS #1
'Write the variables (in proper order) to the newly opened file.
PRINT #1, txtFirstName$
PRINT #1, txtLastName$
'Close and save the file.
CLOSE #1
'Now to recover them, just open the file for input:
OPEN "TempVars.TXT" FOR INPUT AS #1
'Now bring the information back into your variables. (The variable names can even be different.) The variables will be recovered in the same order that you wrote them into the file.
LINE INPUT #1, txtFirstName$
LINE INPUT #1, txtLastName$
'Close the file.
CLOSE #1
It's just that easy.
-Javin [sig]<p>Javin<br><a href=mailto:Javin@Javin-Inc.com>Javin@Javin-Inc.com</a><br><a href=
Inc.</a><br><br>
Why don't sheep shrink when it rains?[/sig]