?
Solved

Left() and Mid() reading tab spacing

Posted on 2003-10-26
4
Medium Priority
?
264 Views
Last Modified: 2010-05-03
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
0
Comment
Question by:Jeremy Daley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 75 total points
ID: 9624711
use array
dim myarray() as string
myarray = split (thetext, "[]")

'myarray(0) is the name

Thank & cheers
0
 
LVL 7

Expert Comment

by:_agj_
ID: 9625021
u cud do a :
string1 = Replace(string1, vbtab, " ")
0
 
LVL 4

Author Comment

by:Jeremy Daley
ID: 9627881
i'll give the "replace" a try and get back to ya...
0
 
LVL 4

Author Comment

by:Jeremy Daley
ID: 9628412
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"
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question