• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

how to skip a line

if i have a text file, how would i do to skip the first line :
"SEQNUM","Date","Hour","ORIG"
20390312.00,10/7/2002 0:00:00,0,10/6/2002 23:58:39
20390979.00,10/7/2002 0:00:00,0,10/7/2002 0:02:38
20391106.00,10/7/2002 0:00:00,0,10/7/2002 0:01:59
20391641.00,10/7/2002 0:00:00,0,10/7/2002 0:05:05

how would start by 20390312?
0
Jhar
Asked:
Jhar
1 Solution
 
koleanCommented:
dim tmp as string
line input #1, tmp

and then read the rest of the file
0
 
simon780Commented:
0
 
aeklundCommented:
Assuming you want to read this file from VB, here is a sample:

Dim lLine as Long
Dim sLine as String
Dim sAllLines as String
Dim sFile as String
Open sFile For Input as #1
  Do Until EOF(1)
  lLine = lLine + 1
  Line Input #1, sLine
  If lLine > 1 Then
    sAllLines = sAllLines & sLine & vbCrLf
  End If

  Loop
Close #1

Debug.Print sAllLines 'Minus the First Line of course
0
 
JharAuthor Commented:
Thx dude a appreciate
it was really easy to understand
0
 
aeklundCommented:
No problem.. glad to help.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now