Rabu, 13 Desember 2017

TUGAS 3.6



Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
Textkt = ""
Textjk = ""
Textht = ""
Textjb = ""
Textjt = ""
Texttotalp = ""
End Sub

Private Sub Cmdproses_Click()
Dim a As String
a = Mid(Textkt, 1, 3)
If a = "BIM" Then
Textjk = "BIMA"
Textht = "50000"
Textjb = "16.00"
End If
If a = "EKO" Then
Textjk = "EKONOMI"
Textht = "35000"
Textjb = "19.00"
End If
If a = "MUT" Then
Textjk = "MUTIARA"
Textht = "23000"
Textjb = "17.00"
End If
If a = "SEN" Then
Textjk = "SENJA"
Textht = "15000"
Textjb = "20.00"
End If
Textjt.SetFocus
End Sub

Private Sub Textjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texttotalp = Val(Textjt) * Val(Textht)
End If
End Sub

0 komentar:

Posting Komentar