Cleaned up...
Sub ParseTextFile2a()
Dim vTmp, n&
Const sFile$ = "C:\Data.txt"
'//where the file contains "a123 A. BC #123"
'//"a123", <Tab "A. BC #123"
'Get the file text parsed by 'TAB' characters
vTmp = Split(ReadTextFile(sFile), vbTab)
For n = LBound(vTmp) To UBound(vTmp)
Debug.Print vTmp(n)
Next 'n
'Parse the 2nd element by 'SPACE' characters
vTmp = Split(vTmp(1), " ")
For n = LBound(vTmp) To UBound(vTmp)
Debug.Print vTmp(n)
Next 'n
End Sub
Returns:
a123
A. BC #123
A.
BC
#123
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion