Leander Pace : Tennis
Mike Tyson : Boxing -
Note: Use option buttons.
Ans :
Private Sub optChess_Click()
If optAnand.Value = True Then txtcolor.BackColor = vbGreen
Else
txtcolor.BackColor = vbRed
End If
End Sub
Private Sub optTennis_Click()
If optPace. Value = True Then
txtcolor.BackColor = vbGreen
Else
txtcolor.BackColor = vbRed
End If
End Sub
Private Sub optCricket_Click ()
If optSachin.Value = True Then
txtcolor.BackColor =
vbGreen
Else
txtcolor.BackColor = vbRed
End If
End Sub
Private Sub optBoxing_Click()
If optTyson.Value = True Then
txtcolor.BackColor = vbGreen
Else
txtcolor.BackColor = vbRed
End If
End Sub
No comments:
Post a Comment