Gaji Pegawai

diar

 

Private Sub cbogol_Click()

Dim a, b, c, d As Variant

Select Case cbogol.Text

Case “I”

a = “1500000”

b = “250000”

Case “II”

a = “2000000”

b = “500000”

Case “III”

a = “2500000”

b = “750000”

Case “IV”

a = “3000000”

b = “1000000”

End Select

c = (Val(a) + Val(b)) * 0.1

d = Val(a) + Val(b) – Val(c)

textpokok.Text = a

texttunjangan.Text = b

textpajak.Text = c

texttotal.Text = d

End Sub

———————————————————————————

Private Sub combatal_Click()

kosong

End Sub

Private Sub comlagi_Click()

kosong

End Sub

———————————————————————————

Private Sub comx_Click()

End

End Sub

———————————————————————————

Private Sub Form_Load()

cbogol.AddItem “I”

cbogol.AddItem “II”

cbogol.AddItem “III”

cbogol.AddItem “IV”

End Sub

———————————————————————————

Private Sub kosong()

textnidn = “”

textnama = “”

textpokok = “”

texttunjangan = “”

textpajak = “”

texttotal = “”

cbogol.Text = “Pilih Golongan”

textnidn.SetFocus

End Sub

———————————————————————————

Private Sub textnama_keypress(keyascii As Integer)

If keyascii = 13 Then

cbogol.SetFocus

End If

End Sub

———————————————————————————

Private Sub textnidn_keypress(keyascii As Integer)

If keyascii = 13 Then

textnama.SetFocus

End If

End Sub

Font2

font2

Private Sub comOK_Click()

lblout.Caption = textinput.Text

If optblue.Value = True Then

lblout.ForeColor = vbBlue

ElseIf optred.Value = True Then

lblout.ForeColor = vbRed

End If

If chcbold.Value = 1 Then

lblout.FontBold = True

Else: lblout.FontBold = False

End If

If chcmiring.Value = 1 Then

lblout.FontItalic = True

Else: lblout.FontItalic = False

End If

End Sub

———————————————————————————–

Private Sub comselesai_Click()

End

End Sub

———————————————————————————–

Data Mahasiswa

npm

Private Sub cmdbatal_Click()

txtnama.SetFocus

Call kosong

End Sub

——————————————————————————–

Private Sub cmdlagi_Click()

txtnama.SetFocus

Call kosong

End Sub

——————————————————————————–

Private Sub cmdproses_Click()

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

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

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

If b = “01” Then

txtps.Text = “Strata Satu”

ElseIf b = “02” Then

txtps.Text = “Diploma Tiga”

ElseIf b = “03” Then

txtps.Text = “Diploma Dua”

ElseIf b = “04” Then

txtps.Text = “Diploma Satu”

End If

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

If a = “1” Then

txtjurusan.Text = “Sistem Informasi”

ElseIf a = “2” Then

txtjurusan.Text = “Manajemen Informatika”

ElseIf a = “3” Then

txtjurusan.Text = “Komputer Akuntansi”

ElseIf a = “4” Then

txtjurusan.Text = “Teknik Informatika”

End If

End Sub

——————————————————————————–

Private Sub cmdx_Click()

Unload Me

End Sub

——————————————————————————–

Private Sub kosong()

txtnama = “”

txtnpm = “”

txtjurusan = “”

txtps = “”

txtmasuk = “”

txturut = “”

End Sub

——————————————————————————–

Private Sub txtnama_keypress(keyascii As Integer)

If keyascii = 13 Then

txtnpm.SetFocus

End If

End Sub

——————————————————————————–

Private Sub txtnpm_keypress(keyascii As Integer)

If keyascii = 13 Then

cmdproses.SetFocus

End If

End Sub

Huruf Mutu

huruf mutu

Private Sub cbonpm_Click()

Dim Nama, Jurusan, mutu As String

Select Case cbonpm.Text

Case “12101691”

Nama = “Agil Ramadhan”

Jurusan = “Sistem Informatika”

Case “11201692”

Nama = “Belalang Kupukupu”

Jurusan = “Teknik Informasi”

Case “11102693”

Nama = “Akim Sialmulu”

Jurusan = “Manajemen Informatika”

Case “12304694”

Nama = “Ponti Abalabal”

Jurusan = “Komputer Akutansi”

End Select

textnama.Text = Nama

textjurusan.Text = Jurusan

textkuis.SetFocus

End Sub

————————————————————-

Private Sub combtl_Click()

cbonpm.SetFocus

cbonpm.Text = “Silahkan Pilih NPM”

textnama = “”

textjurusan = “”

textkuis = “”

textuas = “”

textuts = “”

texttugas = “”

textakhir = “”

textmutu = “”

End Sub

———————————————————————

Private Sub comexit_Click()

End

End Sub

——————————————————————————

Private Sub comproses_Click()

Dim mutu As String

textakhir = (Val(texttugas.Text) + Val(textuts.Text) + Val(textuas.Text) + Val(textkuis.Text)) / 4

 

Select Case textakhir.Text

Case Is > 80

mutu = “A”

Case Is > 70

mutu = “B”

Case Is > 60

mutu = “C”

Case Is > 50

mutu = “D”

Case Is < 50

mutu = “E”

End Select

textmutu.Text = mutu

End Sub

———————————————————————–

Private Sub Form_Load()

cbonpm.AddItem “12101691”

cbonpm.AddItem “11201692”

cbonpm.AddItem “11102693”

cbonpm.AddItem “12304694”

End Sub

——————————————————

Private Sub textkuis_keypress(keyascii As Integer)

If keyascii = 13 Then

texttugas.SetFocus

End If

End Sub

——————————————————————

Private Sub texttugas_keypress(keyascii As Integer)

If keyascii = 13 Then

textuts.SetFocus

End If

End Sub

————————————————————————-

Private Sub textuas_keypress(keyascii As Integer)

If keyascii = 13 Then

comproses.SetFocus

End If

End Sub

————————————————————————-

Private Sub textuts_keypress(keyascii As Integer)

If keyascii = 13 Then

textuas.SetFocus

End If

End Sub

Font1

font

 

Private Sub comexit_Click()

End

End Sub

—————————————————————————————————

Private Sub comproses_Click()

Dim a, b, c As Currency

a = Val(textpokok.Text) + Val(texttunjangan.Text) – Val(textpotongan.Text)

b = Val(a) * 0.1

c = Val(a) – Val(b)

textkotor.Text = a

textpajak.Text = b

textterima.Text = c

comulang.SetFocus

End Sub

————————————————————————————————

Private Sub comulang_Click()

textpokok.SetFocus

textpokok = “”

texttunjangan = “”

textpotongan = “”

textkotor = “”

textpajak = “”

textterima = “”

End Sub

——————————————————————————————-

Private Sub textpokok_keypress(keyascii As Integer)

If keyascii = 13 Then

texttunjangan.SetFocus

End If

End Sub

————————————————————————————–

Private Sub textpotongan_keypress(keyascii As Integer)

If keyascii = 13 Then

comproses.SetFocus

End If

End Sub

——————————————————————————————

Private Sub texttunjangan_keypress(keyascii As Integer)

If keyascii = 13 Then

textpotongan.SetFocus

End If

End Sub

Perhitungan Gaji

Untitled

 

Private Sub comexit_Click()

End

End Sub

—————————————————————————————————

Private Sub comproses_Click()

Dim a, b, c As Currency

a = Val(textpokok.Text) + Val(texttunjangan.Text) – Val(textpotongan.Text)

b = Val(a) * 0.1

c = Val(a) – Val(b)

textkotor.Text = a

textpajak.Text = b

textterima.Text = c

comulang.SetFocus

End Sub

————————————————————————————————

Private Sub comulang_Click()

textpokok.SetFocus

textpokok = “”

texttunjangan = “”

textpotongan = “”

textkotor = “”

textpajak = “”

textterima = “”

End Sub

——————————————————————————————-

Private Sub textpokok_keypress(keyascii As Integer)

If keyascii = 13 Then

texttunjangan.SetFocus

End If

End Sub

————————————————————————————–

Private Sub textpotongan_keypress(keyascii As Integer)

If keyascii = 13 Then

comproses.SetFocus

End If

End Sub

——————————————————————————————

Private Sub texttunjangan_keypress(keyascii As Integer)

If keyascii = 13 Then

textpotongan.SetFocus

End If

End Sub

Diskon3

latihan 1

Private Sub comexit_Click()

End

End Sub

——————————————————————————-

Private Sub comhitung_Click()

text1 = Val(text1.Text) * 0.1

text1 = Val(text1.Text) – Val(text1.Text)

comulang.SetFocus

End Sub

—————————————————————————————–

Private Sub comulang_Click()

text1.SetFocus

text1 = “”

text1 = “”

text1 = “”

End Sub

————————————————————————————-

Private Sub text1_keypress(keyascii As Integer)

If keyascii = 13 Then

text1 = Val(text1.Text) * 0.1

text1 = Val(text1.Text) – Val(text1.Text)

comhitung.SetFocus

End If

End Sub

Diskon2

latihan 1

Private Sub comexit_Click()

End

End Sub

——————————————————————————–

Private Sub comhitung_Click()

text2 = Val(text1.Text) * 0.1

text3 = Val(text1.Text) – Val(text2.Text)

comulang.SetFocus

End Sub

———————————————————————

Private Sub comulang_Click()

text1.SetFocus

text1 = “”

text2 = “”

text3 = “”

End Sub

——————————————————————————-

Private Sub text1_keypress(keyascii As Integer)

If keyascii = 13 Then

comhitung.SetFocus

End If

End Sub

Diskon1

latihan 1

Private Sub comexit_Click()

End

End Sub

————————————————————————————–

Private Sub comulang_Click()

text1.SetFocus

text1 = “”

text2 = “”

text3 = “”

End Sub

—————————————————————————————–

Private Sub text1_keypress(keyascii As Integer)

If keyascii = 13 Then

text2 = Val(text1.Text) * 0.1

text3 = Val(text1.Text) – Val(text2.Text)

comulang.SetFocus

End If

End Sub

Tugas 6

vb5

 

Private Sub Combersih_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Texthasil = “”

End Sub

 

Private Sub Comhitung_Click()

Texthasil = Val(Text1.Text) * Val(Text2.Text)

Combersih.SetFocus

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

 

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Comhitung.SetFocus

End If

End Sub