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

Nama : Ferly Hadi Saputra

Nim : 08.41.019

Private Sub Combo_click()


If Combo.Text = "KMP" Then
nama.Text = "Komputer"
harga.Text = 2500000
ElseIf Combo.Text = "KLK" Then
nama.Text = "Kulkas"
harga.Text = 1500000
ElseIf Combo.Text = "KRS" Then
nama.Text = "Kursi"
harga.Text = 1020000
End If
If harga.Text > 2000000 Then
diskon.Text = "25%"
ElseIf harga.Text < 2000000 Then
diskon.Text = "15%"
End If

If harga.Text > 2000000 Then


total.Text = Val(harga.Text) * 0.25
ElseIf harga.Text < 2000000 Then
total.Text = Val(harga.Text) * 0.15
End If

bayar.SetFocus

End Sub

Private Sub Command1_Click()


kembali.Text = "Rp." & Val(bayar.Text) - Val(total.Text)

End Sub

Private Sub Command2_Click()


Unload Me
End Sub
Private Sub Command3_Click()
nama.Text = ""
harga.Text = ""
diskon.Text = ""
total.Text = ""
bayar.Text = ""
kembali.Text = ""
Combo.Text = "Kode brg"
End Sub

Private Sub proses_Click()


kembali.Text = "Rp. " & Val(bayar.Text) - Val(total.Text)
End Sub

You might also like