Skip to main content

Write a VB Program for Dental Payment Form. Calculate total on selected options from check boxes.

· One min read
Kaustubh Kulkarni

file.vb
  
Private Sub Command1_Click()
Dim sum As Integer
If Check1.Value = 1 Then
sum = sum + 35
End If
If Check2.Value = 1 Then
sum = sum + 150
End If
If Check3.Value = 1 Then
sum = sum + 800
End If
If Check5.Value = 1 Then
sum = sum + 50
End If
If Check6.Value = 1 Then
sum = sum + 85
End If
If Check4.Value = 1 Then
sum = sum + Val(Text1.Text)
End If

Label5.Caption = sum
End Sub