tugas 3

DOLI TGS 3

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtprodi = “”

txttm = “”

txturut = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtprodi = “”

txttm = “”

txturut = “”

End Sub

 

Private Sub cmdproses_Click()

Dim S As String

txttm.Text = “20” & Left(txtnpm.Text, 2)

S = Mid(txtnpm.Text, 3, 1)

If S = “1” Then

txtjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

txtjur.Text = “Manajemen Informatika”

End If

S = Mid(txtnpm.Text, 5, 2)

If S = “01” Then

txtprodi.Text = “Strata Satu”

ElseIf S = “02” Then

txtprodi.Text = “Diploma Tiga”

End If

txturut.Text = Right(txtnpm.Text, 3)

 

End Sub

 

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

 

Iklan

tugas 2

DOLI TGS 2

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtprodi = “”

txttm = “”

txturut = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama = “”

txtnpm = “”

txtjur = “”

txtprodi = “”

txttm = “”

txturut = “”

End Sub

 

Private Sub cmdproses_Click()

Dim S As String

txttm.Text = “20” & Left(txtnpm.Text, 2)

S = Mid(txtnpm.Text, 3, 1)

If S = “1” Then

txtjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

txtjur.Text = “Tekhnik Informatika”

ElseIf S = “3” Then

txtjur.Text = “Manajemn Informatika”

ElseIf S = “4” Then

txtjur.Text = “Komputer Akuntansi”

End If

S = Mid(txtnpm.Text, 4, 2)

If S = “01” Then

txtprodi.Text = “Strata Satu”

ElseIf S = “02” Then

txtprodi.Text = “Diploma Empat”

ElseIf S = “03” Then

txtprodi.Text = “Diploma Tiga”

ElseIf S = “04” Then

txtprodi.Text = “Diploma Dua”

End If

txturut.Text = Right(txtnpm.Text, 3)

 

End Sub

 

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

tugas 1

DOLI TGS 1

 

Private Sub cbogolongan_Click()

Dim gapok, tunjangan, pajak, total As Variant

Select Case cbogolongan.Text

Case “I”

gapok = 2000000

tunjangan = 200000

Case “II”

gapok = 2500000

tunjangan = 250000

Case “III”

gapok = 3000000

tunjangan = 300000

Case “IV”

gapok = 3500000

tunjangan = 350000

Case Else

gapok = 4000000

tunjangan = 400000

End Select

total = gapok + tunjangan

pajak = total * 0.1

txtgapok.Text = gapok

txttunjangan.Text = tunjangan

txtpajak.Text = pajak

txttotal.Text = total – pajak

End Sub

 

Private Sub cmdbatal_Click()

txtnidn.SetFocus

txtnidn = “”

txtnama = “”

cbogolongan = “”

txtgapok = “”

txttunjangan = “”

txtpajak = “”

txttotal = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtnidn.SetFocus

txtnidn = “”

txtnama = “”

cbogolongan = “”

txtgapok = “”

txttunjangan = “”

txtpajak = “”

txttotal = “”

End Sub

 

Private Sub Form_load()

cbogolongan.AddItem “I”

cbogolongan.AddItem “II”

cbogolongan.AddItem “III”

cbogolongan.AddItem “IV”

End Sub

 

 

Private Sub txtnidn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnama.SetFocus

End If

End Sub