Private Sub Command1_Click()
Dim i As Integer, count As Integer, n As Integer, sum As Integer
Randomize
For i = 1 To 20
n = Int(Rnd * 90 + 10)
If n Mod 2 = 0 Then
count = count + 1
sum = sum + n
End If
Next i
MsgBox “count, sum = ” & count & “, ” & sum
End Sub