Sie sind auf Seite 1von 5

FORM 1

Private Sub Command1_Click()

Dim per_extra_large As Integer

Dim per_large As Integer

Dim per_medium As Integer

Dim per_small As Integer

Dim selection_of_pizza As String

Dim YOUR_TOTAL_PAYMENT As Currency

Const price_extra_large As Currency = 20

Const price_large As Currency = 15

Const price_medium As Currency = 12

Const price_small As Currency = 8

per_extra_large = Val(Text2.Text)

per_large = Val(Text3.Text)

per_medium = Val(Text4.Text)

per_small = Val(Text5.Text)

YOUR_TOTAL_PAYMENT = Val(Text1.Text)
If Option1 And Option4.Value = True Then

YOUR_TOTAL_PAYMENT = (price_extra_large * per_extra_large)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option1 And Option5.Value = True Then

YOUR_TOTAL_PAYMENT = (price_large * per_large)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option1 And Option6.Value = True Then

YOUR_TOTAL_PAYMENT = (price_medium * per_medium)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option1 And Option7.Value = True Then

YOUR_TOTAL_PAYMENT = (price_small * per_small)

Text1.Text = YOUR_TOTAL_PAYMENT

End If

If Option2 And Option4.Value = True Then

YOUR_TOTAL_PAYMENT = (price_extra_large * per_extra_large)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option2 And Option5.Value = True Then

YOUR_TOTAL_PAYMENT = (price_large * per_large)

Text1.Text = YOUR_TOTAL_PAYMENT
ElseIf Option2 And Option6.Value = True Then

YOUR_TOTAL_PAYMENT = (price_medium * per_medium)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option2 And Option7.Value = True Then

YOUR_TOTAL_PAYMENT = (price_small * per_small)

Text1.Text = YOUR_TOTAL_PAYMENT

End If

If Option3 And Option4.Value = True Then

YOUR_TOTAL_PAYMENT = (price_extra_large * per_extra_large)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option3 And Option5.Value = True Then

YOUR_TOTAL_PAYMENT = (price_large * per_large)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option3 And Option6.Value = True Then

YOUR_TOTAL_PAYMENT = (price_medium * per_medium)

Text1.Text = YOUR_TOTAL_PAYMENT

ElseIf Option3 And Option7.Value = True Then

YOUR_TOTAL_PAYMENT = (price_small * per_small)

Text1.Text = YOUR_TOTAL_PAYMENT
End If

End Sub

Private Sub Command2_Click()

Text1.Text = " "

Text2.Text = " "

Text3.Text = " "

Text4.Text = " "

Text5.Text = " "

Option1.Value = False

Option2.Value = False

Option3.Value = False

Option4.Value = False

Option5.Value = False

Option6.Value = False

Option7.Value = False

End Sub
Private Sub Command3_Click()

Dim YOUR_TOTAL_PAYMENT As Currency

Dim YOUR_CURRENT_BILL As Currency

Form2.Text20 = Text1.Text

Form2.Text21 = Text1.Text

Form2.Show

Unload Me

End Sub

Private Sub Image1_Click()

End Sub