Tugas 12 Harga Laptop

Untitled

source code :

Private Sub Form_Load()
cbokode.AddItem “Asus A43SA”
cbokode.AddItem “Asus A43SD”
cbokode.AddItem “Asus A43SJ”
cbokode.AddItem “Asus A43TA”
cbokode.AddItem “Asus N43SL”
cbokode.AddItem “Apple MD311”
cbokode.AddItem “Apple MD313”
cbokode.AddItem “Apple MD314”
cbokode.AddItem “Apple MD322”
cbokode.AddItem “Apple MC965”
End Sub

Private Sub cbokode_Click()
Dim hs, merk As String
Select Case cbokode.Text
Case “Asus A43SA”
merk = “Asus A43SA-VX090D”
hs = “5500000”

Case “Asus A43SD”
merk = “Asus A43SD-VX052D”
hs = “4500000”

Case “Asus A43SJ”
merk = “Asus A43SJ-VX792D”
hs = “4300000”

Case “Asus A43TA”
merk = “Asus A43TA-VX034D”
hs = “4900000”

Case “Asus N43SL”
merk = “Asus N43SL-VX264D”
hs = “4300000”

Case “Apple MD311”
merk = “Apple MacBook Pro MD311”
hs = “19300000”

Case “Apple MD313”
merk = “Apple MacBook Pro MD313”
hs = “24200000”

Case “Apple MD314”
merk = “Apple MacBook Pro MD314”
hs = “11900000”

Case “Apple MD322”
merk = “Apple MacBook Pro MD322”
hs = “14700000”

Case “Apple MC965”
merk = “Apple MacBook Air MC965”
hs = “21300000”
End Select

txtmerk.Text = merk
txths.Text = hs
txtjj.SetFocus
End Sub

Private Sub cmdhitunglagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtmerk.Text = “”
txths.Text = “”
txtjj.Text = “”
txthp.Text = “”
txtdis.Text = “”
txttb.Text = “”
End Sub

Private Sub cmdproses_Click()
txthp.Text = Val(txtjj.Text) * Val(txths.Text)
If txthp.Text > 140000000 Then
txtdis.Text = Val(txthp.Text) * 0.15
ElseIf txthp.Text > 135000000 Then
txtdis.Text = Val(txthp.Text) * 0.1
ElseIf txthp.Text > 130000000 Then
txtdis.Text = Val(txthp.Text) * 0.05
ElseIf txthp.Text > 125000000 Then
txtdis.Text = Val(txthp.Text) * 0.02
End If
txttb.Text = Val(txthp.Text) – Val(txtdis.Text)
End Sub

Private Sub cmdkeluar_Click()
End
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