Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

Private Sub cbersih_Click() bersih aktif cmbpizza.

SetFocus End Sub

Sub bersih() cmbpizza = "" tnama = "" Optsmall = 0 optmedium = 0 optlarge = 0 optbeef = 0 optjamur = 0 optcheese = 0 tharga = ""

tbayar = "" tkembali = "" End Sub

Sub aktif() cmbpizza.Enabled = True tnama.Enabled = True Optsmall.Enabled = True optmedium.Enabled = True optlarge.Enabled = True optbeef.Enabled = True optjamur.Enabled = True optcheese.Enabled = True tharga.Enabled = True tbayar.Enabled = True tkembali.Enabled = True chitung.Enabled = True End Sub

Sub nonaktif() cmbpizza.Enabled = False tnama.Enabled = False Optsmall.Enabled = False optmedium.Enabled = False optlarge.Enabled = False optbeef.Enabled = False optjamur.Enabled = False optcheese.Enabled = False

tharga.Enabled = False tbayar.Enabled = False tkembali.Enabled = False chitung.Enabled = False End Sub

Private Sub chitung_Click() tkembali = Val(tbayar) - Val(tharga) End Sub

Private Sub ckeluar_Click() a = MsgBox("Anda Yakin Akan Keluar", vbQuestion + vbOKCancel, "Informasi") If a = vbOK Then End End If End Sub Private Sub cmbpizza_Click() If cmbpizza = "PIZZA 1" Then tnama = "CHICKEN FAVOURITE" ElseIf cmbpizza = "PIZZA 2" Then tnama = "VEGETABLE FAVOURITE" ElseIf cmbpizza = "PIZZA 3" Then tnama = "BEETATO PEPPERONI" End If End Sub Private Sub Form_Load() nonaktif End Sub

Private Sub optbeef_Click() If cmbpizza = "PIZZA 1" Then 'If optbeef = True Then If Optsmall = True Then tharga = 30000 ElseIf optmedium = True Then tharga = 50000 ElseIf optlarge = True Then tharga = 80000 End If 'End If ElseIf cmbpizza = "PIZZA 2" Then 'If optbeef = True Then If Optsmall = True Then tharga = 24000 ElseIf optmedium = True Then tharga = 42000 ElseIf optlarge = True Then tharga = 55000 End If 'End If ElseIf cmbpizza = "PIZZA 3" Then 'If optbeef = True Then If Optsmall = True Then tharga = 35000 ElseIf optmedium = True Then tharga = 55000

ElseIf optlarge = True Then tharga = 85000 End If End If End Sub

Private Sub optcheese_Click() If cmbpizza = "PIZZA 1" Then 'If optcheese = True Then If Optsmall = True Then tharga = 27000 ElseIf optmedium = True Then tharga = 42000 ElseIf optlarge = True Then tharga = 65000 End If ElseIf cmbpizza = "PIZZA 2" Then If Optsmall = True Then tharga = 21000 ElseIf optmedium = True Then tharga = 40000 ElseIf optlarge = True Then tharga = 56000 End If ElseIf cmbpizza = "PIZZA 3" Then If Optsmall = True Then tharga = 34000 ElseIf optmedium = True Then

tharga = 54000 ElseIf optlarge = True Then tharga = 75000 End If End If End Sub

Private Sub optjamur_Click() If cmbpizza = "PIZZA 1" Then If Optsmall = True Then tharga = 25000 ElseIf optmedium = True Then tharga = 40000 ElseIf optlarge = True Then tharga = 60000 End If ElseIf cmbpizza = "PIZZA 2" Then If Optsmall = True Then tharga = 20000 ElseIf optmedium = True Then tharga = 38000 ElseIf optlarge = True Then tharga = 50000 End If ElseIf cmbpizza = "PIZZA 3" Then If Optsmall = True Then tharga = 32000 ElseIf optmedium = True Then

tharga = 50000 ElseIf optlarge = True Then tharga = 65000 End If End If End Sub

You might also like