I'm trying to read each line of a text file into an array, I'm using vbCrLf as the delimiter but the whole file is being read into the first elemnt. I'm using the split function but it doesn't seem to like it. Can anyone see where I'm going wrong?

FileName = Command() + "nng_list.TXT"
FileNumber = FreeFile

'Open file and read lines
Open FileName For Input Access Read As #FileNumber
Do Until EOF(FileNumber)
'Assign content to variable
Line Input #FileNumber, Data

'Create New File of type *.DAT for use in SQL*Loader.exe
WriteFile = Command() + "nng_list.DAT"

WriteFileNumber = FreeFile
'Open New File for writing to

Open WriteFile For Append Access Write As #WriteFileNumber
'Split function to disect data
Datak = Split(Data, vbCrLf)
'Datak = Split(Data, "#", -1)
'Discard unwanted data
Print #WriteFileNumber, Datak()
Loop

Cheers all