I just had to change the code in your Command4_Click event:
Not only does this look alot tidier but it fixes the problem of only one cartoon being highlighted for a raised number. I replaced the RGB function with vbRed simply because I tend avoid it's usage where possible.VB Code:
Private Sub Command4_Click() Dim l As Long Randomize b = 1 + Int(Rnd * 99) Text1.Text = b Label20.Caption = " Nobody's got the " & b For l = 0 To Label6.UBound If Label6(l).Caption = b Then Label6(l).BackColor = vbRed Label20.Caption = "" End If Next l End Sub




Reply With Quote