Tugas 3.3 ENTRI PENJUALAN LAPTOP APPLE


Private Sub cbokode_Click()
Dim Penjualan, discount, kode, merk, bayar As String
Dim Harga As Variant
merk = Mid(cbokode.Text, 7, 5)
If merk = "MC965" Then
txtmerk = "Apple MacBook Air MC965?"
Harga = "12800000"
ElseIf merk = "MC966" Then
txtmerk = "Apple MacBook Air MC966?"
Harga = "15800000"
ElseIf merk = "MC968" Then
txtmerk = "Apple MacBook Air MC968"
Harga = "9900000"
ElseIf merk = "MC969" Then
txtmerk = "Apple MacBook Air MC969?"
Harga = "11900000?"
ElseIf merk = "MC700" Then
txtmerk = "Apple MacBook Air MC700"
Harga = "10800000"
ElseIf merk = "MC721" Then
txtmerk = "Apple MacBook Air MC721?"
Harga = "15900000?"
ElseIf merk = "MC723" Then
txtmerk = "Apple MacBook Air MC723"
Harga = "19300000"
ElseIf merk = "MC724" Then
txtmerk = "Apple MacBook Air MC724"
Harga = "13700000"
ElseIf merk = "MC311" Then
txtmerk = "Apple MacBook Air MC311"
Harga = "24200000"
ElseIf merk = "MC313" Then
txtmerk = "Apple MacBook Air MC313"
Harga = "11900000"
ElseIf merk = "MC314" Then
txtmerk = "Apple MacBook Air MC314?"
Harga = "14700000"
ElseIf merk = "MC318" Then
txtmerk = "Apple MacBook Air MC318"
Harga = "17600000"
ElseIf merk = "MC322" Then
txtmerk = "Apple MacBook Air MC322"
Harga = "21300000"
ElseIf merk = "MC965" Then
txtmerk = "Apple MacBook Air MC965"
Harga = "12800000"
ElseIf merk = "MC966" Then
txtmerk = "Apple MacBook Air MC966"
Harga = "15800000"
End If
txtmerk.Text = merk
txths.Text = Harga
txtjj.SetFocus

End Sub

Private Sub cmdhitung_Click()
cbokode.SetFocus
cbokode.Text = ""
txtmerk.Text = ""
txths.Text = ""
txtjj.Text = ""
txths.Text = ""
txtdis.Text = ""
txttotal.Text = ""
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

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

End Sub

Private Sub Form_Load()
cbokode.AddItem "Apple MC965 MasBook Air"
cbokode.AddItem "Apple MC966 MasBook Air"
cbokode.AddItem "Apple MC968 MasBook Air"
cbokode.AddItem "Apple MC969 MasBook Air"
cbokode.AddItem "Apple MC700 MasBook Pro"
cbokode.AddItem "Apple MC721 MasBook Pro"
cbokode.AddItem "Apple MC723 MasBook Pro"
cbokode.AddItem "Apple MC724 MasBook Pro"
cbokode.AddItem "Apple MC311 MasBook Pro"
cbokode.AddItem "Apple MC313 MasBook Pro"
cbokode.AddItem "Apple MC314 MasBook Pro"
cbokode.AddItem "Apple MC318 MasBook Pro"
cbokode.AddItem "Apple MC322 MasBook Pro"
cbokode.AddItem "Apple MC965 MasBook Air"
cbokode.AddItem "Apple MC966 MasBook Air"

End Sub

Komentar

Postingan populer dari blog ini

Awas!! WhatsApp Palsu Banyak Beredar di PlayStore

PELANTIKAN BUPATI DAN WAKIL BUPATI PRINGSEWU 2017

SERAH TERIMA MAHASISWA KKN STMIK & STIT PRINGSEWU