File is about 150mb and file open code is as follows:

Code:
Dim Filenr As Integer
Dim ByteArray() As Byte

Filenr = FreeFile
Open Filename For Binary As #Filenr
ReDim ByteArray(0 To LOF(Filenr) - 1)
Get #Filenr, , ByteArray()
Close #Filenr
I get the "bad file name or number" error on the Get #Filenr, , ByteArray() line.

It only seems to happen with large files and works fine for other smaller files.

Any ideas?