' Open the file. Read the whole thing into one big string.
Open "myfile.txt" For Binary Access Read As #1
strFile = String(LOF(1), " ")
Get #1, , strFile
Close #1
' create an array from the records in the string
aryRecords = Split(strFile, vbCrLf)
' The number of records is the UBound of the array + 1.
RecCount = UBound(aryRecords) + 1