PRATIKUM 1 VISUAL BASIC

Gambar

Private Sub Cmdproses_Click()
Dim KT As String
Dim T As Long
KT = Left(Txtkt.Text, 3)
If KT = “BIM” Then
Txtht.Text = “50000”
Txtjk.Text = “BIMA”
Txtjb.Text = “16.00”
ElseIf KT = “EKO” Then
Txtht.Text = “35000”
Txtjk.Text = “EKONOMI”
Txtjb.Text = “19.00”
ElseIf KT = “SEN” Then
Txtht.Text = “15000”
Txtjk.Text = “SENJA”
Txtjb.Text = “20.00”
ElseIf KT = “MUT” Then
Txtht.Text = “23000”
Txtjk.Text = “MUTIARA”
Txtjb.Text = “17.00”
End If
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

Private Sub Cmdlagi_Click()
Txtkt.SetFocus
Txtkt.Text = “”
Txtht.Text = “”
Txtjk.Text = “”
Txtjb.Text = “”
Txtjt.Text = “”
Txttotalp.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s