VB _tugas 4

KIKI 1

Private Sub Cmdbatal_Click()

Cbokb.SetFocus

Cbokb = “”

Txtpeng = “”

TxtJB = “”

txttt = “”

Txtpenerbit = “”

Txthg = “”

End Sub

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

Private Sub Cmdlagi_Click()

Cbokb.SetFocus

Cbokb = “”

Txtpeng = “”

TxtJB = “”

txttt = “”

Txtpenerbit = “”

Txthg = “”

End Sub

Private Sub Form_Load()

Cbokb.AddItem = “a-sim-01″

Cbokb.AddItem = “s-edp-05″

Cbokb.AddItem = “m-cdr-02″

Cbokb.AddItem = “i-sim-12″

Cbokb.AddItem = “s-rpl-02″

Cbokb.AddItem = “a-mnj-11″

Cbokb.AddItem = “e-cdr-13″

End Sub

Private Sub Cmdproses_Click()

Dim k, j, p, h, n As String

k = Mid(Cbokb.Text, 3, 3)

If k = “sim” Then

j = “sistem informasi manajemen”

p = “Yati nur oktavia”

h = “75900″

ElseIf k = “edp” Then

j = “elektronic data processing”

p = “Imam tarmizi”

h = “62000″

ElseIf k = “mnj” Then

j = “Manajemen”

p = “Valentina mariana Adiwianti”

h = “42000″

ElseIf k = “cdr” Then

j = “Corel Draw”

p = “Rian Suhandi”

h = “53000″

ElseIf k = “rpl” Then

j = “Rekayasa Perangkat Lunak”

p = “sinta umpu singa’”

h = “83000″

End If

TxtJB.Text = j

Txtpeng.Text = p

Txthg.Text = h

txttt = “20″ & Right(Cbokb.Text, 2)

k = Left(Cbokb.Text, 1)

If k = “a” Then

n = “Andi Offset Yogyakarta”

ElseIf k = “i” Then

n = “Indah Surabaya”

ElseIf k = “S” Then

n = “Salemba Empat”

ElseIf k = “e” Then

n = “Elek Media Komputindo”

ElseIf k = “m” Then

n = “maxicom”

End If

Txtpenerbit.Text = n

End Sub

KIKI 2

Private Sub cbonpm_Click()

Dim nama, jurusan, hm As String

Select Case cbonpm.Text

Case “12100089″

nama = “fahlul rizky”

jurusan = “Sistem Informasi”

Case “12100472″

nama = ” Putri Nur ismalasari”

jurusan = “manajemen informatika”

Case “12201138″

nama = “Muhlisin”

jurusan = “Manajemen Informatika”

Case “12201009″

nama = “arif bestari”

jurusan = “system informasi”

Case “12100083″

nama = “imam mustakim”

jurusan = “Sistem Informasi”

End Select

txtnama.Text = nama

txtjur.Text = jurusan

txtquis.SetFocus

End Sub

Private Sub cmdbatal_Click()

cbonpm.SetFocus

cbonpm.Text = ” “

txtnama.Text = ” “

txtjur.Text = ” “

txtquis.Text = ” “

txttugas.Text = ” “

txtuts.Text = ” “

txtuas.Text = ” “

txtna.Text = ” “

txthm.Text = ” “

End Sub

Private Sub cmdkeluar_Click()

Unload Me

End Sub

Private Sub cmdproses_Click()

Dim na As Integer

Dim hm As String

quis = Val(txtquis.Text)

tugas = Val(txttugas.Text)

uts = Val(txtuts.Text)

uas = Val(txtuas.Text)

na = (quis + tugas + uts + uas) / 4

txtna.Text = na

Select Case txtna.Text

Case Is > 80

hm = “A”

Case Is > 70

hm = “B”

Case Is > 60

hm = “C”

Case Is > 50

hm = “D”

Case Is < 50

hm = “E”

End Select

txthm.Text = hm

End Sub

Private Sub Form_Load()

cbonpm.AddItem “12100089″

cbonpm.AddItem “12100472″

cbonpm.AddItem “12200042″

cbonpm.AddItem “12201009″

cbonpm.AddItem “12100083″

End Sub

Private Sub txtquis_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

End Sub

Private Sub txttugas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuts.SetFocus

End If

End Sub

Private Sub txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuas.SetFocus

End If

End Sub

Private Sub cbogol_Click()

Dim gapok, tunjangan, pajak, total As Variant

Select Case cbogol.Text

Case “I”

gapok = 2000000

tunjangan = 200000

Case “II”

gapok = 3000000

tunjangan = 300000

Case “III”

gapok = 4000000

tunjangan = 400000

Case “IV”

gapok = 5000000

tunjangan = 500000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

txtgapok.Text = gapok

txttunj.Text = tunjangan

txtpajak.Text = pajak

txtterima.Text = total – pajak

End Sub

Private Sub cmdbatal_Click()

txtnidn.SetFocus

txtnidn.Text = “”

txtnama.Text = “”

cbogol.Text = “”

txtgapok.Text = “”

txttunj.Text = “”

txtpajak.Text = “”

txtterima.Text = “”

End Sub

Private Sub cmdkeluar_Click()

Unload Me

End Sub

Private Sub cmdlagi_Click()

txtnidn.SetFocus

txtnidn.Text = “”

txtnama.Text = “”

cbogol.Text = “”

txtgapok.Text = “”

txttunj.Text = “”

txtpajak.Text = “”

txtterima.Text = “”

End Sub

Private Sub Form_Load()

cbogol.AddItem “I”

cbogol.AddItem “II”

cbogol.AddItem “III”

cbogol.AddItem “IV”

End Sub

Private Sub txtnidn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnama.SetFocus

End If

End Sub

KIKI 3

Private Sub Cmdbatal_Click()

Cbokb.SetFocus

Cbokb = “”

Txtpeng = “”

TxtJB = “”

txttt = “”

Txtpenerbit = “”

Txthg = “”

End Sub

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

Private Sub Cmdlagi_Click()

Cbokb.SetFocus

Cbokb = “”

Txtpeng = “”

TxtJB = “”

txttt = “”

Txtpenerbit = “”

Txthg = “”

End Sub

Private Sub Form_Load()

Cbokb.AddItem = “a-sim-01″

Cbokb.AddItem = “s-edp-05″

Cbokb.AddItem = “m-cdr-02″

Cbokb.AddItem = “i-sim-12″

Cbokb.AddItem = “s-rpl-02″

Cbokb.AddItem = “a-mnj-11″

Cbokb.AddItem = “e-cdr-13″

End Sub

Private Sub Cmdproses_Click()

Dim k, j, p, h, n As String

k = Mid(Cbokb.Text, 3, 3)

If k = “sim” Then

j = “sistem informasi manajemen”

p = “Yati nur oktavia”

h = “75900″

ElseIf k = “edp” Then

j = “elektronic data processing”

p = “Imam tarmizi”

h = “62000″

ElseIf k = “mnj” Then

j = “Manajemen”

p = “Valentina mariana Adiwianti”

h = “42000″

ElseIf k = “cdr” Then

j = “Corel Draw”

p = “Rian Suhandi”

h = “53000″

ElseIf k = “rpl” Then

j = “Rekayasa Perangkat Lunak”

p = “sinta umpu singa’”

h = “83000″

End If

TxtJB.Text = j

Txtpeng.Text = p

Txthg.Text = h

txttt = “20″ & Right(Cbokb.Text, 2)

k = Left(Cbokb.Text, 1)

If k = “a” Then

n = “Andi Offset Yogyakarta”

ElseIf k = “i” Then

n = “Indah Surabaya”

ElseIf k = “S” Then

n = “Salemba Empat”

ElseIf k = “e” Then

n = “Elek Media Komputindo”

ElseIf k = “m” Then

n = “maxicom”

End If

Txtpenerbit.Text = n

End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s