Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Input an entire line that starts with NP-Character

Posted on 2004-04-14
3
Medium Priority
?
249 Views
Last Modified: 2010-05-02
I am writing a program to process data from a tab-delimited text file.

I am processing the information one line at a time.  While processing input, I have noticed that lines that have a blank leading field are being shortened.  

For example:

Name         Address            Zip Code

George       1 Small St        16709
Adam         9 Main St         15206
                 12 Jury Ln        90210

When the information is being read...

  The lines will appear

      George[Tab]1 Small St[Tab]16709
      Adam[Tab]9 Main St[Tab]15206
      12 Jury Ln[Tab]90210

Is there a way that I can force VB 6 to read the leading tab?

The reason is that I'm trying to use Split() to take the tabs out, and in the first process am creating a list of the zip codes by comparing strSplit(2).
0
Comment
Question by:gsaksa
[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
3 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 300 total points
ID: 10828097
How about this...

Opening the file, I suppose you've got.

So,

Line Input #1, strData
if instr(1,strData,vbtab) < 4 then strData=vbTab & strData

...??
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10828101
Or, you could even replace the tab with another character...

strData2=replace(strData,vbtab,"|")

Then split on that character...
0
 

Author Comment

by:gsaksa
ID: 10832588
Thanks so much!  I'd have never thought of that!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

719 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