Laman

Selasa, 12 Desember 2017

3.5

Tiket penjualan kereta api
Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtkt.SetFocus
txtkt.Text = ""
txtht.Text = ""
txtjk.Text = ""
txtjb.Text = ""
txtjt.Text = ""
txttotalp.Text = ""
End Sub

Private Sub cmdproses_Click()
Dim kt, jk, jb As String
Dim ht As Currency
kt = Left(txtkt.Text, 3)
If kt = "BIM" Then
ht = "50000"
jk = "BIMA"
jb = "16.00"
ElseIf kt = "EKO" Then
ht = "35000"
jk = "EKONOMI"
jb = "19.00"
ElseIf kt = "MUT" Then
ht = "23000"
jk = "MUTIARA"
jb = "17.00"
ElseIf kt = "SEN" Then
ht = "15000"
jk = "SENJA"
jb = "20.00"
End If
txtht.Text = ht
txtjk.Text = jk
txtjb.Text = jb
txtjt.Text = jt
txtjt.SetFocus
End Sub

Private Sub txtjt_keypress(keyascii As Integer)
If keyascii = 13 Then
txttotalp.Text = Val(txtht.Text) * Val(txtjt.Text)
End If
End Sub



Tidak ada komentar:

Posting Komentar