i am using:

Code:
status.Caption = "loading file..."
filenum = FreeFile
Open Text1.Text For Binary As #filenum
strtext1 = Input(LOF(1), 1)

Close #filenum
to open a file for encryption, but the problem is, if i try and load large files and the computer does not have enough ram to do this then i get a few errors. i was thinking maybe i could split it up and load one chunk then encrypt that chunk and save it and then do the next chunk and save it to the end of the file so when it has done them all the file should be all together but i am not sure how to go about it. i am having trouble because i do not know how to tell visual basic to load, say, the first 10000000 characters of a file. does anyone know how i can do this? thanks.