Q:

VB6 CSV import. Read cell value

I am writing an import from CSV function in a VB6 program. A screenshot of some sample data is below.

I need to read the value of the first cell of each row, exlcuding the top row (A0009, A00023 etc.), then import then rest of the data into the matching supplier in the database.
To do this, I am using this code
Open Txt_FileName For Input As #3

Dim InputLine$

On Error GoTo Import_Sales_Err

Input #3, InputLine$

LedgerTbl.Seek "=", Trim$(InputLine$)
If LedgerTbl.NoMatch Then
    Exit Sub
Else
    LedgerTbl.Edit
End If

Input #3, InputLine$
LedgerTbl("Business_Category") = Trim$(InputLine$)
Input #3, InputLine$
LedgerTbl("bank_account_number") = Trim$(InputLine$)
Input #3, InputLine$
LedgerTbl("bank_sort_code") = Trim$(InputLine$)

However, InputType$ is showing "P-type" - the second value in the top row.
Because of this, it isn't finding a matching supplier, as no supplier is called "P-type".
How can I make it read the supplier correctly?

A:

I imagine somewhere else in the code (which is being executed before the code in the question) you have Input #3, InputLine$, which sets it to read the first cell 'Supp.No'. 
Then, in the code you've posted, you have it again, moving it to the second cell. You'll need to run a Select Case or some other construct to ignore the first 4 items in the spreadsheet, then start to read it once you get to the 5th item, which in this case would be 'A00009'.

