Danimal
asked on
Simple Text Records
This is simple, I just don't know how....
I have a timer in VB6 that runs every 30 seconds. When it runs, I want a record added to a text file with the date/time stamp. The way I have it now, it overwrites the previous text file with the new time, instead of keeping what is there, then adding a new line in the text file for the new timestamp.
Here is what I have:
******* Start Code *****
Sub Timer1_Timer()
Open "C:\test\stamp.txt" For Output Access Write As #3
Print #3, Date & " " & Time
Close #3
End Sub
***** End Code *******
I don't want to read in from the text file each time, I just want to add a new line (with line feed?) with the new date and time. The idea is to keep a list of everytime the timer fires.
Thanks as always for any light you can shed on this incredibly problem. :-)
I have a timer in VB6 that runs every 30 seconds. When it runs, I want a record added to a text file with the date/time stamp. The way I have it now, it overwrites the previous text file with the new time, instead of keeping what is there, then adding a new line in the text file for the new timestamp.
Here is what I have:
******* Start Code *****
Sub Timer1_Timer()
Open "C:\test\stamp.txt" For Output Access Write As #3
Print #3, Date & " " & Time
Close #3
End Sub
***** End Code *******
I don't want to read in from the text file each time, I just want to add a new line (with line feed?) with the new date and time. The idea is to keep a list of everytime the timer fires.
Thanks as always for any light you can shed on this incredibly problem. :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER