|
Answer for QUESTION-8
Dim a As Integer
Private Sub Check1_Click()
Text1.SetFocus
End Sub
Private Sub Check2_Click()
Text2.SetFocus
End Sub
Private Sub Check3_Click()
Text3.SetFocus
End Sub
Private Sub Check4_Click()
Text4.SetFocus
End Sub
Private Sub Check5_Click()
Text5.SetFocus
End Sub
Private Sub Check6_Click()
Text6.SetFocus
End Sub
Private Sub Command1_Click()
a = 0
If Check1.Value = 1 And Text1 <> "" Then a = a + 3 * Val(Text1)
If Check2.Value = 1 And Text2 <> "" Then a = a + 5 * Val(Text2)
If Check3.Value = 1 And Text3 <> "" Then a = a + 10 * Val(Text3)
If Check4.Value = 1 And Text4 <> "" Then a = a + 5 * Val(Text4)
If Check5.Value = 1 And Text5 <> "" Then a = a + 4 * Val(Text5)
If Check6.Value = 1 And Text6 <> "" Then a = a + 8 * Val(Text6)
If a > 1 Then
Label1.Caption = "Total Price= " & a
Else
Label1.Caption = "Select Any Item"
End If
End Sub
Private Sub Command2_Click()
Check1.Value = False
Check2.Value = False
Check3.Value = False
Check4.Value = False
Check5.Value = False
Check6.Value = False
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
End Sub
|