Try changing "strTextLines" to a Variant data type instead of a String array, i.e.
Regards,VB Code:
Private Sub Command1_Click() Dim intFree As Integer Dim strReadText As String 'Dim strTextLines() As String Dim strTextLines As Variant intFree = FreeFile Open "C:\SomeFile.txt" For Binary As #intFree strReadText = Space$(LOF(intFree)) Get #intFree, , strReadText Close #intFree ' Create array of text lines from the file... strTextLines = SplitEx(strReadText, vbNewLine) Text1.Text = strTextLines(0) ' First line... Text2.Text = strTextLines(1) ' Second line... End Sub
- Aaron.




Reply With Quote