hi everyone .....
i did this example and i thought that i finished from it ... but there is a small mistake and the problem i dont know what is it .... this is the coding and am gonna put the GUI picture with it so everyone will know what is the mistake ... so please help me
Option Base 1
Option Explicit
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdStart_Click()
Dim i, j, r, P As Integer
Dim Count(20) As Integer
Dim found As Boolean
Dim F As Integer
Randomize
P = 1
txtDuplication = ""
found = False
lstOriginal.Clear
Randomize
For i = 1 To 20
Count(i) = Int(91 * Rnd()) + 10
lstOriginal.AddItem i & " -->" & Count(i) & ""
Next i
For i = 1 To 20
If (Count(i) = r) Then
found = True
Count(P) = i
P = P + 1
End If
Next i
For i = 1 To 20
F = Count(i)
For j = 1 To i - 1
If Count(j) = F Then
lstOriginal.List(i - 1) = lstOriginal.List(i - 1) & " (Duplicate)"
txtDuplication.Text = "Found!!"
Else
txtDuplication.Text = "notFound!!"
End If
Next j
Next i
End Sub
**************************************************