Reading in a Complete Text File

Aug 24, 2009 12:00

Sometimes you just want to read in a complete text file from your PC without muddling through all the records (i.e. text lines) one by one. When you open a text file in binary mode, such things like EOL won't get special attention and you can read in the text as one big chunk.

Code for function that reads in a text file )

binary, get, close, open, vba, text file, read

Leave a comment

Comments 1

simpler method anonymous April 16 2010, 10:09:26 UTC
a simpler method is:

Open i_Filename for Input as #1
yourText=Input(LOF(1),#1)
Close #1

Reply


Leave a comment

Up