Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb = “”
txtnb = “”
txtjs = “”
txtss = “”
txttr = “”
txthj = “”
txtth = “”
txtterbilang = “”
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub cmdproses_Click()
Dim kb As String
kb = txtkb.Text
If kb = “HB002T” Then
txtnb.Text = “TAPE”
txthj.Text = “275000”
ElseIf kb = “HT002S” Then
txtnb.Text = “SOUND SISTEM”
txthj.Text = “350000”
ElseIf kb = “HB002C” Then
txtnb.Text = “COMPACT”
txthj.Text = “480000”
End If
txtss.Text = Val(txtjs.Text) – Val(txttr.Text)
txtth.Text = Val(txthj.Text) * Val(txtss.Text)
End Sub
Private Sub txtkb_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtjs.SetFocus
End If
End Sub
Private Sub txtjs_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttr.SetFocus
End If
End Sub
Private Sub txttr_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdproses.SetFocus
End If
End Sub