5
4
6
3
5
Then it should display that the duplicate happens after 4 numbers.
Here's my code:
CODE
Option Explicit
Dim ind As Integer
Dim arrays() As Integer
Dim size As Integer
Dim i As Integer
Private Sub Form_Load()
Randomize
size = 5
ReDim arrays(size)
For ind = LBound(arrays) To UBound(arrays)
arrays(ind) = Int(size * Rnd + 1)
Next ind
For ind = LBound(arrays) To UBound(arrays)
List1.AddItem arrays(ind)
Next ind
End Sub
Dim ind As Integer
Dim arrays() As Integer
Dim size As Integer
Dim i As Integer
Private Sub Form_Load()
Randomize
size = 5
ReDim arrays(size)
For ind = LBound(arrays) To UBound(arrays)
arrays(ind) = Int(size * Rnd + 1)
Next ind
For ind = LBound(arrays) To UBound(arrays)
List1.AddItem arrays(ind)
Next ind
End Sub