Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

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

Read/write entire file at once


'puts the entire file into a Byte array
'for character by character action

Open FileName For Binary As #1
    Redim MyByteArray(LOF(1) - 1) As Byte
    Get #1, , MyByteArray
Close #1