Tugas 3 BP4


Private Sub CboKode_Click()
Dim s As String

 s = Mid(cbokode, 7, 5)
 If s = "MC965" Then
 Textmerk = "Apple MacBook Air MC965"
 Texths = "12800000"
 End If
 If s = "MC966" Then
 Textmerk = "Apple MacBook Air MC966"
 Texths = "15800000"
 End If
 If s = "MC968" Then
 Textmerk = "Apple MacBook Air MC968"
 Texths = "9900000"
 End If
 If s = "MC969" Then
 Textmerk = "Apple MacBook Air MC969"
 Texths = "11900000"
 End If
 If s = "MC700" Then
 Textmerk = "Apple MacBook Pro MC700"
 Texths = "10800000"
 End If
 Textjj.SetFocus
 End Sub

Private Sub Cmdbatal_Click()
cbokode = ""
Textmerk = ""
Texths = ""
Texthp = ""
Textdis = ""
Textjj = ""
Texttotal = ""
End Sub

Private Sub Cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Texthp > 40000000 Then
Textdis = (0.15) * Val(Texthp)
ElseIf Texthp > 35000000 Then
Textdis = (0.1) * Val(Texthp)
ElseIf Texthp > 30000000 Then
Textdis = (0.05) * Val(Texthp)
ElseIf Texthp > 25000000 Then
Textdis = (0.01) * Val(Texthp)
End If
Texttotal = Val(Texthp) - Val(Textdis)
End Sub

Private Sub Cmdhitung_Click()
cbokode = ""
Textmerk = ""
Texths = ""
Texthp = ""
Textdis = ""
Textjj = ""
Texttotal = ""
End Sub

Private Sub CmdKeluar_Click()
Unload Me
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 Pro"
End Sub

Komentar

Postingan populer dari blog ini

STMIK PRINGSEWU GELAR PERLOMBAAN HUT RI KE-72