Source Code Aplikasi Entri Data Penjualan Laptop
Buat tampilan seperti dibawah ini
Kemudian masukan script dibawah ini
Private Sub CboKode_Click()
Dim Merk, Harga, Kode As Variant
Kode = Mid(CboKode.Text, 7, 5)
Select Case Kode
Case "MC965"
Merk = "Apple MC965 MacBook Air"
Harga = 12800000
Case "MC966"
Merk = "Apple MC966 MacBook Air"
Harga = 15800000
Case "MC968"
Merk = "Apple MC968 MacBook Air"
Harga = 9900000
Case "MC969"
Merk = "Apple MC969 MacBook Air"
Harga = 11900000
Case "MC700"
Merk = "Apple MC700 MacBook Pro"
Harga = 10800000
Case "MC721"
Merk = "Apple MC721 MacBook Pro"
Harga = 15900000
Case "MC723"
Merk = "Apple MC723 MacBook Pro"
Harga = 19300000
Case "MC724"
Merk = "Apple MC724 MacBook Pro"
Harga = 13700000
Case "MC311"
Merk = "Apple MC311 MacBook Pro"
Harga = 24200000
Case "MC313"
Merk = "Apple MC313 MacBook Pro"
Harga = 11900000
Case "MC314"
Merk = "Apple MC314 MacBook Pro"
Harga = 14700000
Case "MC318"
Merk = "Apple MC318 MacBook Pro"
Harga = 17600000
Case "MC322"
Merk = "Apple MC322 MacBook Pro"
Harga = 21300000
End Select
TxtMerk = Merk
TxtHarga = Harga
End Sub
Private Sub CmdKeluar_Click()
Unload Me
End Sub
Private Sub CmdLagi_Click()
CboKode.SetFocus
CboKode.Text = "Pilih Kode Laptop"
TxtMerk.Text = ""
TxtHarga.Text = ""
TxtJual.Text = ""
TxtHargaJual.Text = ""
TxtDiskon.Text = ""
TxtTotal.Text = ""
End Sub
Private Sub CmdProses_Click()
Dim HS, Jual, Jumlah, Diskon, Total As Variant
HS = Val(TxtHarga)
Jual = Val(TxtJual)
Jumlah = HS * Jual
TxtHargaJual = Jumlah
Select Case Jumlah
Case Is > 140000000
Diskon = Jumlah * 0.15
Case Is > 135000000
Diskon = Jumlah * 0.1
Case Is > 130000000
Diskon = Jumlah * 0.05
Case Is > 125000000
Diskon = Jumlah * 0.02
Case Is <= 125000000
Diskon = Jumlah * 0
End Select
TxtDiskon = Diskon
Total = Jumlah - Diskon
TxtTotal = Total
End Sub
Private Sub Form_Load()
CboKode.AddItem "Apple MC965 MacBook Air"
CboKode.AddItem "Apple MC966 MacBook Air"
CboKode.AddItem "Apple MC968 MacBook Air"
CboKode.AddItem "Apple MC969 MacBook Air"
CboKode.AddItem "Apple MC700 MacBook Pro"
CboKode.AddItem "Apple MC721 MacBook Pro"
CboKode.AddItem "Apple MC723 MacBook Pro"
CboKode.AddItem "Apple MC724 MacBook Pro"
CboKode.AddItem "Apple MC311 MacBook Pro"
CboKode.AddItem "Apple MC313 MacBook Pro"
CboKode.AddItem "Apple MC314 MacBook Pro"
CboKode.AddItem "Apple MC318 MacBook Pro"
CboKode.AddItem "Apple MC322 MacBook Pro"
End Sub
Kemudian masukan script dibawah ini
Private Sub CboKode_Click()
Dim Merk, Harga, Kode As Variant
Kode = Mid(CboKode.Text, 7, 5)
Select Case Kode
Case "MC965"
Merk = "Apple MC965 MacBook Air"
Harga = 12800000
Case "MC966"
Merk = "Apple MC966 MacBook Air"
Harga = 15800000
Case "MC968"
Merk = "Apple MC968 MacBook Air"
Harga = 9900000
Case "MC969"
Merk = "Apple MC969 MacBook Air"
Harga = 11900000
Case "MC700"
Merk = "Apple MC700 MacBook Pro"
Harga = 10800000
Case "MC721"
Merk = "Apple MC721 MacBook Pro"
Harga = 15900000
Case "MC723"
Merk = "Apple MC723 MacBook Pro"
Harga = 19300000
Case "MC724"
Merk = "Apple MC724 MacBook Pro"
Harga = 13700000
Case "MC311"
Merk = "Apple MC311 MacBook Pro"
Harga = 24200000
Case "MC313"
Merk = "Apple MC313 MacBook Pro"
Harga = 11900000
Case "MC314"
Merk = "Apple MC314 MacBook Pro"
Harga = 14700000
Case "MC318"
Merk = "Apple MC318 MacBook Pro"
Harga = 17600000
Case "MC322"
Merk = "Apple MC322 MacBook Pro"
Harga = 21300000
End Select
TxtMerk = Merk
TxtHarga = Harga
End Sub
Private Sub CmdKeluar_Click()
Unload Me
End Sub
Private Sub CmdLagi_Click()
CboKode.SetFocus
CboKode.Text = "Pilih Kode Laptop"
TxtMerk.Text = ""
TxtHarga.Text = ""
TxtJual.Text = ""
TxtHargaJual.Text = ""
TxtDiskon.Text = ""
TxtTotal.Text = ""
End Sub
Private Sub CmdProses_Click()
Dim HS, Jual, Jumlah, Diskon, Total As Variant
HS = Val(TxtHarga)
Jual = Val(TxtJual)
Jumlah = HS * Jual
TxtHargaJual = Jumlah
Select Case Jumlah
Case Is > 140000000
Diskon = Jumlah * 0.15
Case Is > 135000000
Diskon = Jumlah * 0.1
Case Is > 130000000
Diskon = Jumlah * 0.05
Case Is > 125000000
Diskon = Jumlah * 0.02
Case Is <= 125000000
Diskon = Jumlah * 0
End Select
TxtDiskon = Diskon
Total = Jumlah - Diskon
TxtTotal = Total
End Sub
Private Sub Form_Load()
CboKode.AddItem "Apple MC965 MacBook Air"
CboKode.AddItem "Apple MC966 MacBook Air"
CboKode.AddItem "Apple MC968 MacBook Air"
CboKode.AddItem "Apple MC969 MacBook Air"
CboKode.AddItem "Apple MC700 MacBook Pro"
CboKode.AddItem "Apple MC721 MacBook Pro"
CboKode.AddItem "Apple MC723 MacBook Pro"
CboKode.AddItem "Apple MC724 MacBook Pro"
CboKode.AddItem "Apple MC311 MacBook Pro"
CboKode.AddItem "Apple MC313 MacBook Pro"
CboKode.AddItem "Apple MC314 MacBook Pro"
CboKode.AddItem "Apple MC318 MacBook Pro"
CboKode.AddItem "Apple MC322 MacBook Pro"
End Sub
Belum ada Komentar untuk "Source Code Aplikasi Entri Data Penjualan Laptop"
Posting Komentar