Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Read text file into an array #1


'first read the file into a string - includes the line feed/carriage control characters
Dim InString As String , MyArray As Variant
Open "filename.txt" For Binary As #1
InString   = Input (LOF(1), #1)
Close
'now split the string
MyArray = Split(InString, vbCRLF, - 1)