Does anyone know how to load a binary file, to an array.
Printable View
Does anyone know how to load a binary file, to an array.
Don't know exactly what you want, but this code may help as it shows how to read all data from any file into a byte array:
VB Code:
Private Sub Command1_Click() 'Read all data into byte array using get statement Dim ba() As Byte, ff&, i&, a ff = FreeFile Open "c:\tmp\test.txt" For Binary As #ff ReDim ba(0 To LOF(ff) - 1) Get #ff, , ba Close #ff For i = 0 To UBound(ba) Debug.Print ba(i) Next End Sub