ENTRI PENJUALAN KOMPUTER

 
Private Sub cbokode_Click()
Dim jk As String
Dim hs As Currency
Select Case cbokode.Text
Case “P205”
jk = “Pentium II 500 Mega Hz”
hs = “1500000”
Case “P308”
jk = “Pentium III 800 Mega Hz”
hs = “2100000”
Case “P310”
jk = “Pentium III 1.0 Giga Hz”
hs = “3500000”
Case “P415”
jk = “Pentium IV 1.5 Giga Hz”
hs = “4000000”
Case “P417”
jk = “Pentium IV 1.7 Giga Hz”
hs = “4200000”
Case “P419”
jk = “Pentium IV 1.9 Giga Hz”
hs = “5500000”
End Select
txths.Text = hs
txtjk.Text = jk
txtjj.SetFocus
End Sub

Private Sub cmdclose_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtjk.Text = “”
txths.Text = “”
txtjj.Text = “”
txthp.Text = “”
txtdiskon.Text = “”
txthb.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim HP, HB As Double
Dim Diskon As Currency
hs = Val(txths.Text)
jj = Val(txtjj.Text)
HP = (jj * hs)
txthp.Text = HP
If txthp.Text > 30000000 Then
Diskon = Val(txthp.Text) * 0.15
ElseIf txthp.Text > 25000000 Then
Diskon = Val(txthp.Text) * 0.1
ElseIf txthp.Text > 20000000 Then
Diskon = Val(txthp.Text) * 0.05
ElseIf txthp.Text > 15000000 Then
Diskon = Val(txthp.Text) * 0.02
End If
txtdiskon = Diskon
HB = (HP – Diskon)
txthb.Text = HB
End Sub

Private Sub Form_Load()
cbokode.AddItem “P205”
cbokode.AddItem “P308”
cbokode.AddItem “P310”
cbokode.AddItem “P415”
cbokode.AddItem “P417”
cbokode.AddItem “P419”
End Sub

Private Sub txtjj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdproses.SetFocus
End If
End Sub

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

w

Connecting to %s