Hey guys, noob here.. I'm learning to work with arrays but I have a problem with my code somewhere...

My goal is to:
- load a text file
- grab the first 15 characters of each line and store to strIP each time
- see if the new value of strIP matches a value already in the array (arrIPs)
- if it doesn't, then add it..
- if it does, then add 1 to the count for this instance
That last one is my problem. I keep getting inaccurate numbers.
I.E. when something shows up in the text file about 34 times.. it is only showing a count of 2 or 1. I'm not sure what i've done wrong. Could ne1 help?

Everything works according to plan except for the counting.
As you can see, once the file is done loading, I display the count in another text box.... an inaccurate count.. grrrr

VB Code:
  1. Open cd1.FileName For Input As #1
  2. Do Until EOF(1)
  3.     Line Input #1, strNewLine
  4.     ' get the ip string from the start of the log
  5.     strIP = (Mid(strNewLine, 1, txtCharsToCopy))
  6.  
  7.     'loop through the array to see if the ip is in it
  8.     Found = False
  9.     For i = 0 To numIPs
  10.         If strIP = arrIPs(i) Then
  11.             Found = True
  12.             arrIPcount(i) = (arrIPcount(i) + 1)
  13.             Exit For
  14.         End If
  15.     Next i
  16.  
  17.     If Found = False Then
  18.         arrIPs(numIPs) = strIP
  19.         numIPs = numIPs + 1
  20.         ReDim Preserve arrIPs(numIPs)
  21.         ReDim Preserve arrIPcount(numIPs)
  22.         txtSimple = txtSimple & strIP & vbCrLf
  23.     End If
  24. '========================
  25.  
  26. Loop
  27. Close #1
  28. For i = 1 To UBound(arrIPcount)
  29.     'compensate for 0 starting count
  30.     txtIPCount = txtIPCount & arrIPcount(i) & vbCrLf
  31. Next i