Form 2

  • Uploaded by: Shahril Mohamad
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Form 2 as PDF for free.

More details

  • Words: 986
  • Pages: 16
FORM 2 Private Sub Command1_Click()

Dim your_topping_bill As Currency Dim pri_extra_cheese As Currency Dim pri_pepproni As Currency Dim pri_mushrooms As Currency Dim pri_green_peppers As Currency Dim pri_hot_peppers As Currency Dim pri_olives As Currency Dim pri_pineapple As Currency Dim pri_anchovies As Currency Dim pri_seafoods As Currency Dim your_pizza_bill As Currency Dim your_total_bill As Currency

pri_extra_cheese = Val(Text2.Text) pri_pepproni = Val(Text12.Text) pri_mushrooms = Val(Text13.Text) pri_green_peppers = Val(Text14.Text) pri_hot_peppers = Val(Text15.Text) pri_olives = Val(Text16.Text) pri_pineapple = Val(Text17.Text) pri_anchovies = Val(Text18.Text)

pri_seafoods = Val(Text19.Text) your_pizza_bill = Val(Text20.Text) your_topping_bill = Val(Text1.Text) your_total_bill = Val(Text21.Text)

If Check1.Value And Check2.Value And Check3.Value And Check4.Value And Check5.Value And Check6.Value And Check7.Value = True And Check8.Value = True And Check9.Value Then your_topping__bill = ((pri_extra_cheese) + (pri_pepproni) + (pri_mushrooms) + (pri_green_peppers) + (pri_olives) + (pri_pineapple) + (pri_anchovies) + (pri_seafoods)) Text1.Text = your_topping_bill End If

End Sub

Private Sub Command10_Click() Dim pri_5 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_5 = Val(Text6.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check5.Value = 1 Then pri_total = Val(Text21.Text) + 4 Text21.Text = pri_total Form2.List1.AddItem "RM 4.00" Form3.List1.AddItem "RM 4.00" Form4.List1.AddItem "RM 4.00"

Form3.Text5 = Text21.Text Form4.Text5 = Text21.Text

End If

End Sub

Private Sub Command11_Click() Dim pri_6 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_6 = Val(Text7.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check6.Value = 1 Then pri_total = Val(Text21.Text) + 5 Text21.Text = pri_total Form2.List1.AddItem "RM 5.00" Form3.List1.AddItem "RM 5.00" Form4.List1.AddItem "RM 5.00"

Form3.Text5 = Text21.Text Form4.Text5 = Text21.Text

End If End Sub

Private Sub Command12_Click() Dim pri_7 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_7 = Val(Text8.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check7.Value = 1 Then pri_total = Val(Text21.Text) + 4 Text21.Text = pri_total Form2.List1.AddItem "RM 4.00" Form3.List1.AddItem "RM 4.00" Form4.List1.AddItem "RM 4.00" Form3.Text5 = Text21.Text

Form4.Text5 = Text21.Text End If End Sub

Private Sub Command13_Click() Form1.Show Unload Me

End Sub

Private Sub Command14_Click() Dim pri_8 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_8 = Val(Text10.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check8.Value = 1 Then pri_total = Val(Text21.Text) + 4 Text21.Text = pri_total

Form2.List1.AddItem "RM 4.00" Form3.List1.AddItem "RM 4.00" Form4.List1.AddItem "RM 4.00" Form3.Text5 = Text21.Text Form4.Text5 = Text21.Text End If

End Sub

Private Sub Command15_Click() Dim pri_9 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_9 = Val(Text10.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check9.Value = 1 Then pri_total = Val(Text21.Text) + 4 Text21.Text = pri_total Form2.List1.AddItem "RM 4.00"

Form3.List1.AddItem "RM 4.00" Form4.List1.AddItem "RM 4.00" End If

End Sub

Private Sub Command2_Click()

Form3.Show Unload Me

End Sub

Private Sub Command3_Click()

Text2.Text = " " Text3.Text = " " Text4.Text = " " Text5.Text = " " Text6.Text = " " Text7.Text = " " Text8.Text = " " Text9.Text = " " Text10.Text = " "

Text21.Text = " "

Check1.Value = False Check2.Value = False Check3.Value = False Check4.Value = False Check5.Value = False Check6.Value = False Check7.Value = False Check8.Value = False Check9.Value = False

List1.Clear

End Sub

Private Sub Command4_Click() Dim n As Integer

msg1 = "you can choose 5 topping only!!!"

If Check1.Value = 1 Then

n = n + 1 And n > 5 MsgBox msg1 ElseIf Check2.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1 ElseIf Check3.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1 ElseIf Check4.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1 ElseIf Check5.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1 ElseIf Check6.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1 ElseIf Check7.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1 ElseIf Check8.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1 ElseIf Check9.Value = 1 Then n = n + 1 And n > 5 MsgBox msg1

End If

If n > 5 Then MsgBox msg1 End If

If n > 5 Then MsgBox msg1 End If

End Sub

Private Sub Command5_Click() Dim pri_total As Currency Dim pri_1 As Integer Dim pri_2 As Integer

pri_total = Val(Text1.Text)

pri_1 = Val(Text2.Text) pri_2 = Val(Text3.Text)

If Check10.Value = True Then pri_total = Val(Text2.Text) + Val(Text3.Text) Text1.Text = pri_total End If

End Sub

Private Sub Command6_Click() Dim pri_1 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_1 = Val(Text2.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check1.Value = 1 Then

pri_total = Val(Text21.Text) + 3 Text21.Text = pri_total Form2.List1.AddItem "RM 3.00" Form3.List1.AddItem "RM 3.00" Form4.List1.AddItem "RM 3.00" Form3.Text5 = Text21.Text Form4.Text5 = Text21.Text

End If

End Sub

Private Sub Command7_Click() Dim pri_2 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_2 = Val(Text3.Text)

pri_pizza = Val(Text20.Text)

pri_total = Val(Text21.Text)

If Check2.Value = 1 Then pri_total = Val(Text21.Text) + 4 Text21.Text = pri_total Form2.List1.AddItem "RM 4.00" Form3.List1.AddItem "RM 4.00" Form4.List1.AddItem "RM 4.00" Form3.Text5 = Text21.Text Form4.Text5 = Text21.Text

End If

End Sub

Private Sub Command8_Click() Dim pri_3 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_3 = Val(Text4.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check3.Value = 1 Then pri_total = Val(Text21.Text) + 4 Text21.Text = pri_total Form2.List1.AddItem "RM 4.00" Form3.List1.AddItem "RM 4.00" Form4.List1.AddItem "RM 4.00" Form3.Text5 = Text21.Text Form4.Text5 = Text21.Text

End If

End Sub

Private Sub Command9_Click() Dim pri_4 As Integer Dim pri_topping As Currency Dim pri_pizza As Currency Dim pri_total As Currency

pri_4 = Val(Text5.Text)

pri_pizza = Val(Text20.Text) pri_total = Val(Text21.Text)

If Check4.Value = 1 Then pri_total = Val(Text21.Text) + 4 Text21.Text = pri_total Form2.List1.AddItem "RM 4.00" Form3.List1.AddItem "RM 4.00" Form4.List1.AddItem "RM 4.00" Form3.Text5 = Text21.Text Form4.Text5 = Text21.Text

End If

End Sub

Private Sub Image1_Click()

End Sub

Related Documents

Form 2
May 2020 9
Form 2
June 2020 10
Form (2)
November 2019 9
Form 2 Chapter 2
May 2020 19
Artwork Form 2
June 2020 1

More Documents from ""

Form 2
June 2020 10
Cover Page
June 2020 9
Complete Report
June 2020 26
Form 1
June 2020 6
May 2020 45