Please help me with my program guys!
Im currently creating a color guessing program, for every correct answer will give score. The codes of my program are below. Im having a hard time in correcting my code. It has an error of variable not defined please help me!


Option Explicit
Dim score As Integer
Private Sub Command1_Click()
Dim Values(3) As ColorConstants
Values(0) = vbRed
Values(1) = vbBlue
Values(2) = vbGreen
Dim RandomNumber As ColorConstants
RandomNumber = Values(Rnd * 2)
Label1.BackColor = RandomNumber
Randomize
End Sub

Private Sub Command2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Text1.Text = Label1.BackColor = Values(0) Then
score = score + 1
Label3.Caption = score
End If
If Text1.Text = Label1.BackColor = Values(1) Then
score = score + 1
Label3.Caption = score
If Text1.Text = Label1.BackColor = Values(2) Then
score = score + 1
Label3.Caption = score
End Sub

Private Sub Form_Load()
Label2.Caption = "the color is:"
Text1.Text = ""
Label4.Caption = "score:"
Label1.Caption = ""
Command2.Caption = "submit"
End Sub