tugas 3. program14

14

Private Sub cmdbatal_Click()

Txtnama.SetFocus

Txtnama = “”

Txtnik = “”

txtgol = “”

Txtkode = “”

Txtstatus = “”

Txttahun = “”

Txtbagian = “”

Txtjabatan = “”

Txtgapok = “”

Txttunjangan = “”

Txttoga = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama = “”

Txtnik = “”

txtgol = “”

Txtkode = “”

Txtstatus = “”

Txttahun = “”

Txtbagian = “”

Txtjabatan = “”

Txtgapok = “”

Txttunjangan = “”

Txttoga = “”

End Sub

Private Sub Cmdproses_Click()

Dim s As String

s = Left(Txtnik.Text, 4)

Txttahun.Text = “2015”

s = Mid(Txtnik.Text, 5, 1)

If s = “A” Then

txtgol.Text = “A”

Txtjabatan.Text = “MANAJER”

Txtgapok.Text = “4000000”

Txttunjangan.Text = “1025000”

ElseIf s = “B” Then

txtgol.Text = “B”

Txtjabatan.Text = “KA.SEKSI”

Txtgapok.Text = “3500000”

Txttunjangan.Text = “975000”

ElseIf s = “C” Then

txtgol.Text = “C”

Txtjabatan.Text = “STAF”

Txtgapok.Text = “3000000”

Txttunjangan.Text = “925000”

End If

s = Mid(Txtnik.Text, 7, 1)

If s = “S” Then

Txtkode.Text = “S”

Txtstatus.Text = “SINGLE”

ElseIf s = “M” Then

Txtkode.Text = “M”

Txtstatus.Text = “MENIKAH”

ElseIf s = “J” Then

Txtkode.Text = “J”

Txtstatus.Text = “JANDA”

ElseIf s = “D” Then

Txtkode.Text = “D”

Txtstatus.Text = “DUDA”

End If

s = Right(Txtnik.Text, 3)

If s = “KEU” Then

Txtbagian.Text = “ACOUNTING”

ElseIf s = “ADM” Then

Txtbagian.Text = “Administrasi”

ElseIf s = “SDM” Then

Txtbagian.Text = “General affair”

ElseIf s = “EDP” Then

Txtbagian.Text = “IT UNIT”

ElseIf s = “SPM” Then

Txtbagian.Text = “SECURITY”

End If

Txttoga.Text = Val(Txtgapok.Text) + Val(Txttunjangan.Text)

End Sub

Iklan

tugas 3.program13

13

Private Sub CMDBATAL_Click()

TXTKB.SetFocus

TXTKB.Text = “”

TXTJB.Text = “”

TXTP.Text = “”

TXTPENERBIT.Text = “”

TXTHG.Text = “”

TXTTAHUN.Text = “”

End Sub

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub CMDLAGI_Click()

TXTKB.SetFocus

TXTKB.Text = “”

TXTJB.Text = “”

TXTP.Text = “”

TXTPENERBIT.Text = “”

TXTHG.Text = “”

TXTTAHUN.Text = “”

End Sub

Private Sub CMDPROSES_Click()

Dim s As String

TXTTAHUN.Text = “20” & Right(TXTKB.Text, 2)

s = Left(TXTKB.Text, 1)

If s = “A” Then

TXTPENERBIT.Text = “andi offset yogyakarta”

TXTHG.Text = “75900”

ElseIf s = “I” Then

TXTPENERBIT.Text = “indah surabaya”

TXTHG.Text = “62000”

ElseIf s = “S” Then

TXTPENERBIT.Text = “salemba empat”

TXTHG.Text = “42000”

ElseIf s = “E” Then

TXTPENERBIT.Text = “elekmedia komputindo”

TXTHG.Text = “53000”

ElseIf s = “M” Then

TXTPENERBIT.Text = “Maxicom”

TXTHG.Text = “83000”

End If

s = Mid(TXTKB.Text, 3, 3)

If s = “SIM” Then

TXTP.Text = “andra setiawan”

TXTJB.Text = “sistem informasi manajemen”

ElseIf s = “EDP” Then

TXTP.Text = “desi istiqomah”

TXTJB.Text = “elektronik data procesing”

ElseIf s = “RPL” Then

TXTP.Text = “ernita sari”

TXTJB.Text = “rekayasa perangkat lunak”

ElseIf s = “MNJ” Then

TXTP.Text = “sandy fitrajaya”

TXTJB.Text = “manjemen”

ElseIf s = “CDR” Then

TXTP.Text = “tri indah sari”

TXTJB.Text = “corel draw”

End If

End Sub

tugas3. program 11

11

Private Sub CMDBATAL_Click()

TXTNAMA.SetFocus

TXTNAMA = ” ”

TXTNPM = ” ”

JURUSAN = ” ”

PRODI = ” ”

TAHUN = ” ”

NOURUT = ” ”

PENDIDIKAN = ” ”

TERBILANG.Text = ” ”

End Sub

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub CMDLAGI_Click()

TXTNAMA.SetFocus

TXTNAMA = ” ”

TXTNPM = ” ”

JURUSAN = ” ”

PRODI = ” ”

TAHUN = ” ”

NOURUT = ” ”

PENDIDIKAN = ” ”

TERBILANG.Text = ” ”

End Sub

Private Sub CMDPROSES_Click()

Dim S As String

TAHUN.Text = “20” & Left(TXTNPM.Text, 2)

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

If S = “1” Then

JURUSAN.Text = “Sistem Informasi”

ElseIf S = “2” Then

JURUSAN.Text = “Tehnik informasi”

ElseIf S = “3” Then

JURUSAN.Text = “Manajemen Informatika”

ElseIf S = “4” Then

JURUSAN.Text = “Manajemen & Komp. Akuntansi”

End If

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

If S = “01” Then

PRODI.Text = “STRATA SATU”

PENDIDIKAN.Text = “1950000”

ElseIf S = “02” Then

PRODI.Text = “DIPLOMA EMPAT”

PENDIDIKAN.Text = “1750000”

ElseIf S = “03” Then

PRODI.Text = “DIPLOMA TIGA”

PENDIDIKAN.Text = “1650000”

ElseIf S = “04” Then

PRODI.Text = “DIPLOMA SATU”

PENDIDIKAN.Text = “1450000”

End If

NOURUT.Text = Right(TXTNPM.Text, 3)

End Sub

Private Sub txtnpm_keypress(keyascii As Integer)

If keyascii = 13 Then

TXTNAMA.SetFocus

Dim S As String

TAHUN.Text = “20” & Left(TXTNPM.Text, 2)

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

If S = “1” Then

JURUSAN.Text = “Sistem Informasi”

ElseIf S = “2” Then

JURUSAN.Text = “Tehnik informasi”

ElseIf S = “3” Then

JURUSAN.Text = “Manajemen Informatika”

ElseIf S = “4” Then

JURUSAN.Text = “Manajemen & Komp. Akuntansi”

End If

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

If S = “01” Then

PRODI.Text = “STRATA SATU”

PENDIDIKAN.Text = “1950000”

ElseIf S = “02” Then

PRODI.Text = “DIPLOMA EMPAT”

PENDIDIKAN.Text = “1750000”

ElseIf S = “03” Then

PRODI.Text = “DIPLOMA TIGA”

PENDIDIKAN.Text = “1650000”

ElseIf S = “04” Then

PRODI.Text = “DIPLOMA SATU”

PENDIDIKAN.Text = “1450000”

End If

NOURUT.Text = Right(TXTNPM.Text, 3)

End If

End Sub

tugas 3. program 10

10

Private Sub CMDBATAL_Click()

TXTNAMA.SetFocus

TXTNAMA = “”

TXTNPM = “”

TXTKLS = “”

TXTJU = “”

TXTPS = “”

TXTTM = “”

TXTNU = “”

TXTUP = “”

TXTBPS = “”

TXTUB = “”

TXTBPA = “”

TXTTB = “”

End Sub

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub CMDLAGI_Click()

TXTNAMA.SetFocus

TXTNAMA = “”

TXTNPM = “”

TXTKLS = “”

TXTJU = “”

TXTPS = “”

TXTTM = “”

TXTNU = “”

TXTUP = “”

TXTBPS = “”

TXTUB = “”

TXTBPA = “”

TXTTB = “”

End Sub

Private Sub CMDPROSES_Click()

Dim x As String

x = Left(TXTNPM.Text, 1)

If x = “E” Then

TXTKLS.Text = “Eksekutif”

TXTBPA.Text = “600000”

TXTUB.Text = “1250000”

ElseIf x = “R” Then

TXTKLS.Text = “Reguler”

TXTBPA.Text = “600000”

TXTUB.Text = “1250000”

End If

TXTTM.Text = “20” & Mid(TXTNPM.Text, 3, 2)

x = Mid(TXTNPM.Text, 5, 1)

If x = “1” Then

TXTJU.Text = “Sistem Informasi”

ElseIf x = “2” Then

txt_ju.Text = “Managemen Informatika”

ElseIf x = “3” Then

txt_ju.Text = “Managemen dan Komp. Akuntansi”

End If

x = Mid(TXTNPM.Text, 6, 2)

If x = “01” Then

TXTPS.Text = “Strata Satu”

TXTUP.Text = “200000”

ElseIf x = “02” Then

TXTPS.Text = “Diploma Tiga”

TXTUP.Text = “150000”

ElseIf x = “03” Then

TXTPS.Text = “Diploma Satu”

TXTUP.Text = “150000”

End If

x = Left(TXTNPM.Text, 1) & Mid(TXTNPM.Text, 6, 2)

If x = “E” & “01” Then

TXTBPS.Text = “1900000”

ElseIf x = “E” & “02” Then

TXTBPS.Text = “1650000”

ElseIf x = “E” & “03” Then

TXTBPS.Text = “1350000”

ElseIf x = “R” & “01” Then

TXTBPS.Text = “1500000”

ElseIf x = “R” & “02” Then

TXTBPS.Text = “1250000”

ElseIf x = “R” & “03” Then

TXTBPS.Text = “1250000”

End If

TXTNU = Right(TXTNPM.Text, 3)

TXTBPA.SetFocus

End Sub

Private Sub TXTBPA_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTNAMA.SetFocus

TXTTB.Text = Val(TXTUP.Text) + Val(TXTBPS.Text) + Val(TXTUB.Text) + Val(TXTBPA.Text)

End If

End Sub

tugas 3. program9

9

Private Sub CMDBATAL_Click()

TXTKB.SetFocus

TXTKB = “”

TXTJB = “”

TXTPR = “”

TXTTT = “”

TXTPN = “”

TXTHRG = “”

End Sub

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub CMDLAGI_Click()

TXTKB.SetFocus

TXTKB = “”

TXTJB = “”

TXTPR = “”

TXTTT = “”

TXTPN = “”

TXTHRG = “”

End Sub

Private Sub CMDPROSES_Click()

Dim S As String

TXTTT.Text = “20” & Mid(TXTKB.Text, 5, 2)

S = Left(TXTKB.Text, 3)

If S = “SIM” Then

TXTJB.Text = “Sistem Informasi”

TXTPR.Text = “Fadiya ulfa”

ElseIf S = “EDP” Then

TXTJB.Text = “elektronik data Procesing”

TXTPR.Text = “Nurul Agustina”

ElseIf S = “MNJ” Then

TXTJB.Text = “Manajemen”

TXTPR.Text = “Riyan Hidayat”

ElseIf S = “CDR” Then

TXTJB.Text = “Corel Draw”

TXTPR.Text = “Siti Nurkhotimah”

ElseIf S = “RPL” Then

TXTJB.Text = “Rekaya Perangkat Lunak ”

TXTPR.Text = “Winda erlianti”

End If

S = Mid(TXTKB.Text, 8, 1)

If S = “A” Then

TXTPN.Text = “Andi offset yogyakarta”

TXTHRG.Text = “75900”

ElseIf S = “I” Then

TXTPN.Text = “Indah Surabaya”

TXTHRG.Text = “62000”

ElseIf S = “S” Then

TXTPN.Text = “Salemba Empat”

TXTHRG.Text = “42000”

ElseIf S = “E” Then

TXTPN.Text = “Elek Media Komputindo”

TXTHRG.Text = “53000”

ElseIf S = “M” Then

TXTPN.Text = “Maxicom”

TXTHRG.Text = “83000”

End If

End Sub

tugas3. program8

8

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub CMDLAGI_Click()

TXTKT.SetFocus

TXTKT.Text = “”

TXTHT.Text = “”

TXTJK.Text = “”

TXTJB.Text = “”

TXTJT.Text = “”

TXTTP.Text = “”

End Sub

Private Sub CMDPROSES_Click()

Dim S As String

S = (TXTKT.Text)

If S = “MUT2212” Then

TXTHT.Text = “23000”

TXTJK.Text = “MUTIARA”

TXTJB.Text = “17.00”

TXTJT.SetFocus

ElseIf S = “BIM2212” Then

TXTHT.Text = “50000”

TXTJK.Text = “BIMA”

TXTJB.Text = “16.00”

TXTJT.SetFocus

ElseIf S = “EKO2212” Then

TXTHT.Text = “35000”

TXTJK.Text = “EKONOMI”

TXTJB.Text = “19.00”

TXTJT.SetFocus

ElseIf S = “SEN2212” Then

TXTHT.Text = “75000”

TXTJK.Text = “SENJA”

TXTJB.Text = “20.00”

TXTJT.SetFocus

End If

End Sub

Private Sub TXTJT_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim A, B, C As Single

A = TXTHT.Text

B = TXTJT.Text

C = B * A

TXTTP.Text = C

End If

End Sub

tugas3.program7

7

Private Sub CMDBATAL_Click()

KODEBUKU.SetFocus

KODEBUKU.Text = “”

TXTJB.Text = “”

TXTPG.Text = “”

TXTTT.Text = “”

TXTP.Text = “”

TXTH.Text = “”

End Sub

Private Sub CMDKELUAR_Click()

End

End Sub

Private Sub CMDLAGI_Click()

KODEBUKU.SetFocus

KODEBUKU.Text = “”

TXTJB.Text = “”

TXTPG.Text = “”

TXTTT.Text = “”

TXTP.Text = “”

TXTH.Text = “”

End Sub

Private Sub CMDPROSES_Click()

Dim s As String

TXTTT.Text = “20” & Right(KODEBUKU.Text, 2)

s = Mid(KODEBUKU.Text, 3, 3)

If s = “SIM” Then

TXTJB.Text = “Sistem Informasi Manajemen”

ElseIf s = “EDP” Then

TXTJB.Text = “Elektronik Data Processing”

ElseIf s = “MNJ” Then

TXTJB.Text = “Manajemen”

ElseIf s = “CDR” Then

TXTJB.Text = “Corel Draw”

ElseIf s = “RPL” Then

TXTJB.Text = “Rekayasa Perangkat Lunak”

End If

s = Left(KODEBUKU.Text, 1)

If s = “A” Then

TXTPG.Text = “Yati Nur Oktavia”

TXTH.Text = “75900”

TXTP.Text = “Andi Offset Yogyakarta”

ElseIf s = “I” Then

TXTPG.Text = “Imam Tarmizi”

TXTH.Text = “620000”

TXTP.Text = “Indah Surabaya”

ElseIf s = “S” Then

TXTPG.Text = “Valentina Mariana adiwinanti”

TXTH.Text = “42000”

TXTP.Text = “Salemba Empat”

ElseIf s = “E” Then

TXTPG.Text = “Ryan Suhandi”

TXTH.Text = “53000”

TXTP.Text = “Elek Media Komputindo”

ElseIf s = “M” Then

TXTPG.Text = “Sinta Umpu Singa”

TXTH.Text = “83000”

TXTP.Text = “Maxicom”

End If

TXTH.SetFocus

End Sub

Private Sub Form_Load()

KODEBUKU.AddItem “A-SIM-01”

KODEBUKU.AddItem “I-EDP-02”

KODEBUKU.AddItem “S-MNJ-03”

KODEBUKU.AddItem “E-CDR-04”

KODEBUKU.AddItem “M-RPL-05”

End Sub