Private Sub cmdproses_Click()
Dim kode As String
kode = Left(txtkt.Text, 3)
If kode = "BIM" Then
txtht.Text = "50000"
txtjk.Text = "BIMA"
txtjb.Text = "16.00"
ElseIf kode = "EKO" Then
txtht.Text = "35000"
txtjk.Text = "EKONOMI"
txtjb.Text = "19.00"
ElseIf kode = "MUT" Then
txtht.Text = "23000"
txtjk.Text = "MUTIARA"
txtjb.Text = "17.00"
ElseIf kode = "SEN" Then
txtht.Text = "15000"
txtjk.Text = "SENJA"
txtjb.Text = "20.00"
End If
txtjt.SetFocus
End Sub
Private Sub Form_Load()
txtht.Enabled = False
txtjk.Enabled = False
txtjb.Enabled = False
txttotalp.Enabled = False
End Sub
Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp = Val(txtht) * Val(txtjt)
End If
End Sub
Dim kode As String
kode = Left(txtkt.Text, 3)
If kode = "BIM" Then
txtht.Text = "50000"
txtjk.Text = "BIMA"
txtjb.Text = "16.00"
ElseIf kode = "EKO" Then
txtht.Text = "35000"
txtjk.Text = "EKONOMI"
txtjb.Text = "19.00"
ElseIf kode = "MUT" Then
txtht.Text = "23000"
txtjk.Text = "MUTIARA"
txtjb.Text = "17.00"
ElseIf kode = "SEN" Then
txtht.Text = "15000"
txtjk.Text = "SENJA"
txtjb.Text = "20.00"
End If
txtjt.SetFocus
End Sub
Private Sub Form_Load()
txtht.Enabled = False
txtjk.Enabled = False
txtjb.Enabled = False
txttotalp.Enabled = False
End Sub
Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp = Val(txtht) * Val(txtjt)
End If
End Sub
Komentar
Posting Komentar