Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21159

[resolved] want to save and load a text file in vb6 please help!

$
0
0
Hi,

Im trying to make a timer for my program, if someone closes the program, when they re-open it I want the timer to continue from where it left of. I have been trying for nearly four hours now and keep getting errors :cry:
this is some of the code from my label,

Private Sub Label6_Change()
object.createTextFile (test) << this isn't working
Dim fh As Integer
Dim myline As String
fh = FreeFile
Open "C:\test.txt" For Input As #fh
Line Input #fh, myline
Label6.Caption = myline
Print #fh, Label6.Caption
Close #fh

the error I am getting is object required, The text file has some numbers on it, also once I have fixed that Problem I also need to remove "" marks from the text file, if anyone can help me with that also will be apreciated. Im 13 so please be a little patient. also if you could come up with your own code that would be great as-well

Viewing all articles
Browse latest Browse all 21159

Trending Articles