This should start you off, I haven't tested it so it might be wrong...
VB Code:
Dim NumberOfClicks As Integer = 31 'the variable youwant to write Sub WriteNumber() 'to write text file Dim myFile As StreamWriter = IO.File.CreateText("Your path here") myFile.WriteLine(NumberOfClicks) myFile.Close() End Sub Sub Readnumber() 'to read it back in Dim myFile As StreamReader = IO.File.OpenText("Your path here") NumberOfClicks = Integer.Parse(myFile.ReadLine.Trim) myFile.Close() End Sub
Note there is no error trapping for things like illegal files and so forth.




Reply With Quote