Private Sub cmdkeluar_Click()

Unload Me

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.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