tugas 1

Untitled-1

Private Sub cmdbatal_Click()
txtNIDN.SetFocus
txtNIDN.Text = “”
txtnama.Text = “”
Cbogolongan.Text = “”
txtgapok.Text = “”
txttunjangan.Text = “”
Txtpajak.Text = “”
txttotal.Text = “”

End Sub
Private Sub cmdlagi_Click()
txtNIDN.SetFocus
txtNIDN.Text = “”
txtnama.Text = “”
Cbogolongan.Text = “”
txtgapok.Text = “”
txttunjangan.Text = “”
Txtpajak.Text = “”
txttotal.Text = “”

End Sub

Private Sub Form_Load()
Cbogolongan.AddItem “I”
Cbogolongan.AddItem “I”
Cbogolongan.AddItem “III”
Cbogolongan.AddItem “IV”

End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub cbogolongan_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case Cbogolongan.Text
Case “I”
gapok = 1500000
tunjangan = 150000
Case “II”
gapok = 2000000
tunjangan = 200000
Case “III”
gapok = 2500000
tunjangan = 250000
Case “IV”
gapok = 3000000
tunjangan = 300000
Case Else
gapok = 0
tunjangan = 0
End Select
total = gapok + tunjangan
pajak = total * 0.1
txtgapok.Text = gapok
txttunjangan.Text = tunjangan
Txtpajak.Text = pajak
txttotal.Text = total – pajak
End Sub

 

 

penjualan tiket kereta api

retni

 

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtkt.SetFocus
Txtht = “”
txtjk = “”
txtjb = “”
txtjt = “”
txttotalp = “”

End Sub

Private Sub cmdproses_Click()
Dim jenis, harga, jam As String

Select Case txtkt.Text
Case Is = “BIM”
jenis = “BIMA”
harga = “50000”
jam = “16.00”

Case Is = “EKO”
jenis = “EKONOMI”
harga = “35000”
jam = “19.00”

Case Is = “MUT”
jenis = “MUTIARA”
harga = “23000”
jam = “17.00”

Case Is = “SEN”
jenis = “SENIA”
harga = “15000”
jam = “20.00”

End Select

txtjk.Text = jenis
Txtht.Text = harga
txtjb.Text = jam
txtjt.SetFocus

End Sub

Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAsci = 13 Then
txttotalp.SetFocus
End If
txttotalp.Text = Val(Txtht.Text) * Val(txtjt.Text)
End Sub

tugas 2

 

 

 

Private Sub CommandBATAL_Click()
TXTKB.SetFocus
TXTKB = “”
TXTNB = “”
TXTHB = “”
TXTJB = “”
TXTJBY = “”
End Sub

Private Sub CommandKELUAR_Click()
Unload Me
End Sub

Private Sub CommandLAGI_Click()
TXTKB.SetFocus
TXTKB = “”
TXTNB = “”
TXTHB = “”
TXTJB = “”
TXTJBY = “”
End Sub

Private Sub TXTHB_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTJB.SetFocus
End If
End Sub
Private Sub TXTJB_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTJBY.Text = Val(TXTHB.Text) * Val(TXTJB.Text)
End If
End Sub

Private Sub TXTKB_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTNB.SetFocus
End If
End Sub

Private Sub TXTNB_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTHB.SetFocus
End If
End Sub

 

tugas Vibi 1

 

 

Private Sub Commandbatal_Click()
txtnpm.SetFocus
txtnpm = “”
Txtnama = “”
txtps = “”
txtjurusan = “”
txtalamat = “”
End Sub

Private Sub Commandkeluar_Click()
Unload Me
End Sub

Private Sub Commandlagi_Click()
txtnpm.SetFocus
txtnpm = “”
Txtnama = “”
txtps = “”
txtjurusan = “”
txtalamat = “”
End Sub