Thread: text files
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_12_] Stuart[_12_] is offline
external usenet poster
 
Posts: 6
Default text files


Think I have sort of worked it out myself, however could someone explain
what "EOF(1)" is all about, and do i really have to do this one char at a
time. Also, how much info could be got using this method (obviously i would
not be putting it into a msgbog)

Sub getInfo()

Dim q, theData
Open "c:\Active\temp\testfile.txt" For Input As #1
Do While Not EOF(1)
q = Input(1, #1)
theData = theData & q
Loop
Close #1
MsgBox theData

End Sub


Stuart wrote in message
...
Is it possable to extract the data held within text files on the hard

drive
directly into a worksheet through VBA.