Rabu, 15 Maret 2017
Program Aplikasi Gaji Karyawan
Kode Program Combo Box Jabatan :
Private Sub cbojabatan_Click()
If cbojabatan.Text = "M. Produksi" Then
txtpokok.Text = "3000000"
txttunjangan.Text = "1000000"
ElseIf cbojabatan.Text = "M. Personalia" Then
txtpokok.Text = "2500000"
txttunjangan.Text = "1000000"
ElseIf cbojabatan.Text = "M. Pemasaran" Then
txtpokok.Text = "2000000"
txttunjangan.Text = "500000"
ElseIf cbojabatan.Text = "M. Keuangan" Then
txtpokok.Text = "4000000"
txttunjangan.Text = "1500000"
End If
End Sub
Kode Sub Form Load :
Private Sub Form_Load()
cbojabatan.AddItem "M. Produksi"
cbojabatan.AddItem "M. Personalia"
cbojabatan.AddItem "M. Pemasaran"
cbojabatan.AddItem "M. Keuangan"
End Sub
Kode Program Tombol Keluar :
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Kode Program Tombol Mulai Lagi :
Private Sub cmdlagi_Click()
txtnama.Text = ""
txtnip.Text = ""
cbojabatan.Text = ""
txttunjangan.Text = ""
txtpajak.Text = ""
txtbersih.Text = ""
txtpokok.Text = ""
txtnama.SetFocus
End Sub
Kode Program Tombol Total :
Private Sub cmdtotal_Click()
txtpajak.Text = Val(txtpokok.Text) * 5 / 100
txtbersih.Text = Val((txtpokok.Text) + Val(txttunjangan.Text)) - Val(txtpajak.Text)
End Sub
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar