Private Sub Cbokode_Click()
Dim merk, Harga, HM As Integer
Select Case Cbokode.Text
Case "Apple MC965 MacBook Air"
merk = "Apple MacBook Air MC965"
Harga = "12800000"
Case "Apple MC966 MacBook Air"
merk = "Apple MacBook Air MC966"
Harga = "15800000"
Case "Apple MC968 MacBook Air"
merk = "Apple MacBook Air MC968"
Harga = "9900000"
Case "Apple MC969 MacBook Air"
merk = "Apple MacBook Air MC969"
Harga = "11900000"
Case "Apple MC700 MacBook Pro"
merk = "Apple MacBook Pro MC700"
Harga = "10800000"
Case "Apple MC721 MacBook Pro"
merk = "Apple MacBook Pro MC721"
Harga = "15900000"
Case "Apple MC723 MacBook Pro"
merk = "Apple MacBook Pro MC723"
Harga = "19300000"
Case "Apple MC724 MacBook Pro"
merk = "Apple MacBook Pro MC724"
Harga = "13700000"
Case "Apple MC311 MacBook Pro"
merk = "Apple MacBook Pro MC311"
Harga = "24200000"
Case "Apple MC313 MacBook Pro"
merk = "Apple MacBook Pro MC313"
Harga = "11900000"
Case "Apple MC314 MacBook Pro"
merk = "Apple MacBook Pro MC314"
Harga = "14700000"
Case "Apple MC318 MacBook Pro"
merk = "Apple MacBook Pro MC318"
Harga = "17600000"
Case "Apple MC322 MacBook Pro"
merk = "Apple MacBook Pro MC322"
Harga = "21300000"
End Select
Txtmerk.Text = merk
Txths.Text = Harga
Txtjj.SetFocus
End Sub
Private Sub Cmdhitung_Click()
Cbokode.SetFocus
Cbokode = ""
Txtmerk = ""
Txths = ""
Txtjj = ""
Txthp = ""
Txtdis = ""
Txttb = ""
End Sub
Private Sub Cmdkeluar_Click()
End
End Sub
Private Sub Cmdproses_Click()
Dim s, DISC As String
s = Mid(Cbokode, 7, 5)
If s = "MC965" Then
Txtmerk = "Apple MC965 MacBook
Air"
Txths = "12800000"
ElseIf s = "MC966" Then
Txtmerk = "Apple MC966 MacBook
Air"
Txths = "15800000"
ElseIf s = "MC968" Then
Txtmerk = "Apple MC968 MacBook
Air"
Txths = "9900000"
ElseIf s = "MC969" Then
Txtmerk = "Apple MC968 MacBook
Air"
Txths = "11900000"
ElseIf s = "MC700" Then
Txtmerk = "Apple MC700 MacBook
Pro"
Txths = "10800000"
ElseIf s = "MC721" Then
Txtmerk = "Apple MC721 MacBook
Pro"
Txths = "15900000"
ElseIf s = "MC723" Then
Txtmerk = "Apple MC723 MacBook
Pro"
Txths = "19300000"
ElseIf s = "MC724" Then
Txtmerk = "Apple MC724 MacBook
Pro"
Txths = "13700000"
ElseIf s = "MC311" Then
Txtmerk = "Apple MC311 MacBook
Pro"
Txths = "24200000"
ElseIf s = "MC313" Then
Txtmerk = "Apple MC313 MacBook
Pro"
Txths = "11900000"
ElseIf s = "MC314" Then
Txtmerk = "Apple MC314 MacBook
Pro"
Txths = "14700000"
ElseIf s = "MC318" Then
Txtmerk = "Apple MC318 MacBook
Pro"
Txths = "17600000"
ElseIf s = "MC322" Then
Txtmerk = "Apple MC322 MacBook
Pro"
Txths = "21300000"
End If
Txthp = Val(Txths) * Val(Txtjj)
Select Case Txthp.Text
Case Is > 140000000
DISC = 0.15 * Val(Txthp)
Case Is > 135000000
DISC = 0.1 * Val(Txthp)
Case Is > 130000000
DISC = 0.05 * Val(Txthp)
Case Is > 125000000
DISC = 0.02 * Val(Txthp)
End Select
Txtdis.Text = DISC
Txttb = Txthp - DISC
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
Tidak ada komentar:
Posting Komentar