tugas 1

 

GAMBAR A

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
Txtkode.SetFocus
Txtkode = “”
Txtht = “”
Txtjk = “”
Txtjb = “”
TXTJT = “”
Txttotal = “”

End Sub

Private Sub Cmdproses_Click()
Dim S As String
S = Left(Txtkode.Text, 3)
If S = “BIM” Then
Txtjk.Text = “BIMA”
Txtht.Text = “50000”
Txtjb.Text = “16.00 WIB”
ElseIf S = “EKO” Then
Txtjk.Text = “EKONOMI”
Txtht.Text = “35000”
Txtjb.Text = “19.00 WIB”
ElseIf S = “MUT” Then
Txtjk.Text = “MUTIARA”
Txtht.Text = “23000”
Txtjb.Text = “17.00 WIB”
ElseIf S = “SEN” Then
Txtjk.Text = “SENJA”
Txtht.Text = “15000”
Txtjb.Text = “20.00 WIB”
End If
Txttotal.Text = Val(Txtht.Text) * Val(TXTJT.Text)
End Sub
Private Sub Txjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txttotal.Text = Val(Txtht.Text) * Val(TXTJT.Text)
End If

End Sub

Private Sub txtkt_KeyPress(KeyAscii As Integer)
Dim S As String
S = Left(Txtkt.Text, 3)
If S = “BIM” Then
Txtjk.Text = “BIMA”
Txtht.Text = “50000”
Txtjb.Text = “16.00 WIB”
ElseIf S = “EKO” Then
Txtjk.Text = “EKONOMI”
Txtht.Text = “35000”
Txtjb.Text = “19.00 WIB”
ElseIf S = “MUT” Then
Txtjk.Text = “MUTIARA”
Txtht.Text = “23000”
Txtjb.Text = “17.00 WIB”
ElseIf S = “SEN” Then
Txtjk.Text = “SENJA”
Txtht.Text = “15000”
Txtjb.Text = “20.00 WIB”
End If
If KeyAscii = 13 Then
TXTJT.SetFocus
End If

End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s