In order to read the first 20 characters from a text file, you could use the GET statement like this...
Dim strFile as String
strFile = Space(20) ' "size" the input buffer
Open "C:\TestFile.Txt" for Binary as #1
Get #1, 1, strFile ' read the buffer of data from the file
Close #1 ' Close the file
Me.Text1.Text = strFile
Last edited by loquin; 01-04-07 at 13:20.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert