[RESOLVED] Read Text File Charcter by Character.
Hey everyone, this one has been stumping me for a while now, i need to read a text file character by character, immediately the Input Statemtn jumped to mind, and then i thought about incrememnting how much of the file i fetches and usinf the Left Command to get the next character as below -
VB Code:
Do Until EOF(ff)
x = x + 1
Str = Input(x, ff)
Str = Right(Str, 1)
Debug.Print Str
Loop
Needless to say it doesn't work...
Can anyone show me how i would go about doing this ?
Re: Read Text File Charcter by Character.
VB Code:
Dim tmp As String
Open "C:\CSO.txt" For Input As #1
tmp = Input(LOF(1), 1)
Close #1
For x = 1 To Len(tmp)
LetteR = Mid(tmp, x, 1)
'do something with Letter
Next
Re: Read Text File Charcter by Character.
Wow, you've been helpful today. :thumb:
Cheers.
Re: [RESOLVED] Read Text File Charcter by Character.
In fact so helpful that i can actually ditch my file reading process altogether and do it straight through my program. Thanks.