TUGAS 3 BP 6


Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command2_Click()
Textkode = ""
Textjk = ""
Textht = ""
Textjb = ""
Textjt = ""
Texttotal = ""
Textkode.SetFocus
End Sub

Private Sub Command1_Click()
Dim a As String
a = Mid(Textkode, 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
Texttotal = Val(Textjt) * Val(Textht)
End If
End Sub

Komentar

Postingan Populer