Rabu, 13 Desember 2017

TUGAS 3.4

Private Sub CboKode_Click()
Dim s As String
s = Mid(CboKode, 7, 5)
 If s = "MC965" Then
 txtmerk = "Apple MacBook Pro MC965"
 Txths = "12800000"
 End If
 If s = "MC966" Then
 txtmerk = "Apple MacBook Pro MC966"
 Txths = "15800000"
 End If
 If s = "MC968" Then
 txtmerk = "Apple MacBook Pro MC968"
 Txths = "9900000"
 End If
 If s = "MC969" Then
 txtmerk = "Apple MacBook Pro MC969"
 Txths = "11900000"
 End If
 txtjj.SetFocus

End Sub

Private Sub Command1_Click()
txthp = Val(txtjj) * Val(Txths)
If txthp > 40000000 Then
txtdis = (0.15) * Val(txthp)
ElseIf txthp > 35000000 Then
txtdis = (0.1) * Val(txthp)
ElseIf txthp > 30000000 Then
txtdis = (0.05) * Val(txthp)
ElseIf txthp > 25000000 Then
txtdis = (0.01) * Val(txthp)
End If
Txttb = Val(txthp) - Val(txtdis)
 End Sub




Private Sub Command2_Click()
CboKode = ""
txtmerk = ""
Txths = ""
txtjj = ""
txthp = ""
txtdis = ""
Txttb = ""
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_load()
CboKode.AddItem "Apple MC965 MacBook Pro"
CboKode.AddItem "Apple MC966 MacBook Pro"
CboKode.AddItem "Apple MC968 MacBook Pro"
CboKode.AddItem "Apple MC969 MacBook Pro"
End Sub



Related Posts:

  • TUGAS 3.6 Normal 0 false false false EN-US X-NONE X-NONE … Read More
  • TUGAS 3.7 Normal 0 false false false EN-US X-NONE X-NONE … Read More
  • TUGAS 3.2 Normal 0 false false false EN-US X-NONE X-NONE … Read More
  • TUGAS 3.3 Normal 0 false false false EN-US X-NONE X-NONE Private Sub CmdBatal_Click() Txtnama =… Read More
  • TUGAS 3.4 Private Sub CboKode_Click()Dim s As String s = Mid(CboKode, 7, 5) If s = "MC965" Then txtmerk = "Apple MacBook Pro MC965" Txths = "12800000" End If If s = "MC966" Then txtmerk = "Apple MacBook … Read More

0 komentar:

Posting Komentar