Link to home
Start Free TrialLog in
Avatar of Jeremy Daley
Jeremy DaleyFlag for United States of America

asked on

Left() and Mid() reading tab spacing

i have tabs separating fields in a .txt file.

the only way that i can get the Left() or Mid() statement to work right is if i take out the tabs and put in all spaces up to the max character position.
is there any way that i can read tab spaces. my code says:

    If thefile.AtEndOfStream = False Then
        thetext = thefile.ReadLine
        lblname.Caption = Left(thetext, 24)
    End If

(with tab spacing), when i put a breakpoint in my program, i want thetext to read "Timmy Thompson", but instead it reads "Timmy Thompson[]13[]OH[]".....where 13 and OH are age and state. but still it doesn't read the tabspacing.

i know this may not seem real clear, but either is my head right now....if you need more specification, let me know....otherwise, your help is appreciated.
jeremy
ASKER CERTIFIED SOLUTION
Avatar of fantasy1001
fantasy1001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _agj_
_agj_

u cud do a :
string1 = Replace(string1, vbtab, " ")
Avatar of Jeremy Daley

ASKER

i'll give the "replace" a try and get back to ya...
the replace didn't work because it only puts one space for each tab which isn't what i was looking for. the array worked perfectly except i just used "vbTab" in place of the "[]"....

awesome...thanks...now i know something about "split"