Hi all,
I am trying count down an Array, I can’t figure out how get all the items in the array to fill a listbox, my problem is I keep missing the last item in the array, this is just a snippet of what I have with in a module.
All of the items with in the array are there, i think the problem is with the -1, but I am not sure, can some one shine some light on this?
Thanks,
Darryl.
Option Explicit
Do Until i = 10
Set os = Sheets(1).Cells(i + 281, k) ‘PLATE
zzzzz = VBA.Format(CDate(ddate), “dd-mmm-yy”)
If HasComment(os) Then
A = VBA.Mid(os.Comment.Text, 1, 256)
arrparts = Split(A, “+”)
For j = LBound(arrparts) To UBound(arrparts) – 1
ReDim Preserve Plate(iii)
Plate(iii) = arrparts(j)
iii = iii + 1
Next j
End If
i = i + 1
Loop
iii = 0
i = 0
‘If validateArray(Plate) = True Then
For j = LBound(Plate) To UBound(Plate) – 1
If InStr(1, Plate(j), “First”, vbTextCompare) > 0 Then
Mail_Form.LB_Plate.AddItem VBA.Left(Plate(j), InStr(1, Plate(j), “First”, vbTextCompare) – 3)
End If
End If