tugas 6

GAMBAR TIPE F

Private Sub Cbokode_Click()
Dim mt, hs, TB As Integer
Select Case Cbokode.Text
Case “asus A43SA”
mt = “asus A43SA-VX090D”
hs = “5500000”
Case “AsusA43SD”
mt = “Asus A43SD-VX052D”
hs = “4500000”
Case “AsusA43SJ”
mt = “Asus A43SJ-VX792D”
hs = “4300000”
Case “AsusA43TA”
mt = “Asus A43TA-VX034D”
hs = “4900000”
Case “AsusN43SL”
mt = “Asus N43SL-VX264D”
hs = “4300000”
Case “Apple MD311”
mt = “Apple MacBook Pro MD311”
hs = “19300000”
Case “Apple MD313”
mt = “Apple MacBook Pro MD313”
hs = “24200000”
Case “Apple MD314”
mt = “Apple MacBook Pro MD314”
hs = “11900000”
Case “Apple MD322”
mt = “Apple MacBook Pro MD322”
hs = “14700000”
Case “Apple MC965”
mt = “Apple MacBook Pro MC965”
hs = “21300000”
End Select
Txtmerk.Text = mt
Txths.Text = hs
Txtjj.SetFocus

End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdproses_Click()
Txthp.Text = Val(Txths) * Val(Txtjj)
Select Case Txthp.Text
Case Is > 140000000
Txtdis.Text = Val(Txthp) * 0.15
Case Is > 135000000
Txtdis.Text = Val(Txthp) * 0.1
Case Is > 130000000
Txtdis.Text = Val(Txthp) * 0.05
Case Is > 125000000
Txtdis.Text = Val(Txthp) * 0.02
End Select
Txttb.Text = Val(Txthp) – Val(Txtdis)
End Sub

Private Sub Cmdlagi_Click()
Cbokode.SetFocus
Cbokode.Text = “”
Txtmerk.Text = “”
Txths.Text = “”
Txtjj.Text = “”
Txthp.Text = “”
Txtdis.Text = “”
Txttb.Text = “”
End Sub

Private Sub Form_Load()
Cbokode.AddItem “asus A43SA”
Cbokode.AddItem “asus A43SD”
Cbokode.AddItem “asus A43SJ”
Cbokode.AddItem “asus A43TA”
Cbokode.AddItem “asus A43SL”
Cbokode.AddItem “Apple MD311”
Cbokode.AddItem “Apple MD313”
Cbokode.AddItem “Apple MD314”
Cbokode.AddItem “Apple MD322”
Cbokode.AddItem “Apple MC965”
Cbokode.AddItem “Apple MC314 MacBook Pro”
Cbokode.AddItem “Apple MC318 MacBook Pro”
Cbokode.AddItem “Apple MC322 MacBook Pro”
Cbokode.AddItem “Apple MC965 MacBook Air”
Cbokode.AddItem “Apple MC966 MacBook Air”

End Sub

Private Sub Txtjj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txthp.Text = Val(Txths) * Val(Txtjj)
Select Case Txthp.Text
Case Is > 140000000
Txtdis.Text = Val(Txthp) * 0.15
Case Is > 135000000
Txtdis.Text = Val(Txthp) * 0.1
Case Is > 130000000
Txtdis.Text = Val(Txthp) * 0.05
Case Is > 125000000
Txtdis.Text = Val(Txthp) * 0.02
End Select
Txttb.Text = Val(Txthp) – Val(Txtdis)
End If
End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s