Hi all,

I have an array that has the following data


501837430761
501837430762
501837430763
501837430764
501837430765
501837430766
501837430766
Void,1,501837430766
501837430767
501837430768
501837430769

What I need to do is when ever it read's the Void,1,501837430766 line i would like to remove the number (1) from the array (in this case it would remove the extra 5018374320766 from the list and then removes the Void line.

I have been trying to figure this out for the last 7hrs with no good.

The following is what I have come up with so far

Code:
Public DataStorage      As String
Public LineData         As String
Public FreeNumber       As String
 
Private Sub Command1_Click()
    FreeNumber = FreeFile
    Open "c:\Data1.dat" For Input As #FreeNumber
        Do While Not EOF(FreeNumber)
            Input #FreeNumber, LineData
            List1.AddItem LineData
        Loop
    Close FreeNumber
    
 
    Dim k As Long
    With List1
        For k = .ListCount - 1 To 0 Step -1
            If InStr(1, .List(k), "VOID", vbTextCompare) > 0 Then
                .RemoveItem (k)
                .RemoveItem (k - 1)
            End If
        Next
    End With
End Sub

Private Sub Command2_Click()
FreeNumber = FreeFile

    Open "c:\SKUData.dat" For Output As #FreeNumber
        Print #FreeNumber, DataStorage
    Close FreeNumber
End Sub

Private Sub Form_Load()
    DataStorage = ""
    DataStorage = DataStorage & "5018374320761" & vbNewLine
    DataStorage = DataStorage & "5018374320762" & vbNewLine
    DataStorage = DataStorage & "5018374320763" & vbNewLine
    DataStorage = DataStorage & "5018374320764" & vbNewLine
    DataStorage = DataStorage & "5018374320765" & vbNewLine
    DataStorage = DataStorage & "5018374320766" & vbNewLine
    DataStorage = DataStorage & "5018374320766" & vbNewLine
    DataStorage = DataStorage & "Void,1,5018374320766" & vbNewLine
    DataStorage = DataStorage & "5018374320767" & vbNewLine
    DataStorage = DataStorage & "5018374320768" & vbNewLine
    DataStorage = DataStorage & "5018374320769" & vbNewLine
    DataStorage = DataStorage & "5018374320770" & vbNewLine
    DataStorage = DataStorage & "5018374320771" & vbNewLine
    DataStorage = DataStorage & "5018374320772" & vbNewLine
    DataStorage = DataStorage & "5018374320773" & vbNewLine
    DataStorage = DataStorage & "5018374320774" & vbNewLine
    DataStorage = DataStorage & "5018374320775" & vbNewLine
    DataStorage = DataStorage & "5018374320776" & vbNewLine
End Sub
if someone could help I would BE FOREVER greatfull as I think this
has given me a nervous brakedown (After I have finished this project I am SOO having a Vacation)

Thanks for all your advice in advance guys & Gals

Drew