RSH
August 3rd, 2001, 10:31 AM
With the following code generating a file how would one delete just the Individual array elements from the file and not delete the whole file. One can make each element = "" and save it but that still leaves the element with nothing in it. The above also leaves the (txt) Icon in place.
Private Sub Sorter()
For Y = 0 To 20
If SeqNo = Y Then Sources(Y) = Text1.Text: Combo1.List(Y) = Sources(Y): Typ(Y) = Text2.Text: Number(Y) = Text3.Text: Amount(Y) = Text4.Text: Rate(Y) = Text5.Text: DateIn(Y) = Text6.Text: DateOut(Y) = Text7.Text: SeqNum(Y) = Text8.Text
Next Y
Call FILER
End Sub
Private Sub FILER()
Close #1
Open "c:\Windows\Accounts.txt" For Output As #1
For Y = 0 To 20
Write #1, Sources(Y), Typ(Y), Number(Y), Amount(Y), Rate(Y), DateIn(Y), DateOut(Y), SeqNum(Y)
Next Y
Close #1
End Sub
Private Sub Sorter()
For Y = 0 To 20
If SeqNo = Y Then Sources(Y) = Text1.Text: Combo1.List(Y) = Sources(Y): Typ(Y) = Text2.Text: Number(Y) = Text3.Text: Amount(Y) = Text4.Text: Rate(Y) = Text5.Text: DateIn(Y) = Text6.Text: DateOut(Y) = Text7.Text: SeqNum(Y) = Text8.Text
Next Y
Call FILER
End Sub
Private Sub FILER()
Close #1
Open "c:\Windows\Accounts.txt" For Output As #1
For Y = 0 To 20
Write #1, Sources(Y), Typ(Y), Number(Y), Amount(Y), Rate(Y), DateIn(Y), DateOut(Y), SeqNum(Y)
Next Y
Close #1
End Sub