Hi, Im receiving the error Subscript out of range whenever I try to populate my listview using csv.

Is there a limit for the data the listview can hold?

If the csv has only about 1000 rows, the listview displays it without errors. But my csv file usually holds more than 3000 rows.


The code goes like this,
Code:
Private Sub Form_Load()

    Dim strParts() As String
    Dim strRow As String
    Dim xy As ListItem
    
    Open "C:\purchased.csv" For Input As #1
    
    Do While Not EOF(1)
        Line Input #1, strRow
        strParts = Split(strRow, ",")
        Set xy = ListView1.ListItems.Add(, , strParts(0))
        xy.SubItems(1) = strParts(1)
        xy.SubItems(2) = strParts(2)
        xy.SubItems(3) = strParts(3)
        xy.SubItems(4) = strParts(4)
        xy.SubItems(5) = strParts(5)
        xy.SubItems(6) = strParts(6)
        xy.SubItems(7) = strParts(7)
        xy.SubItems(8) = strParts(8)
        xy.SubItems(9) = strParts(9)

    Loop
   
End Sub