' The other great reason to have a blog: transporting stuff w/o e-mail!
Sub Main()
Dim myArray() As String
Dim tempChar As String
Dim tempString As String
Dim i As Integer
Dim LastFilePosition As Integer
Dim LastElement As Integer
Open "h:\kvnrggl\test.txt" For Input As #1
LastFilePosition = 0
LastElement = 0
For i = 1 To LOF(1)
If i = LOF(1) Then
Debug.Print "it's time"
End If
tempChar = Input(1, #1)
If (tempChar = Chr(10)) Or (tempChar = Chr(13)) Or (i = LOF(1)) Then
If (LastFilePosition + 1) <> i Then
If (i = LOF(1)) Then tempString = tempString & tempChar
ReDim Preserve myArray(LastElement) As String
myArray(LastElement) = tempString
Debug.Print myArray(LastElement)
tempString = ""
LastElement = LastElement + 1
End If
LastFilePosition = i
Else
tempString = tempString & tempChar
End If
Next i
Close #1
End Sub