Membuat Program Penggajian Karyawan pada visual
Basic
*Listing Program* :
Dim total, lembur, gaji, pajak, tunjangan As Double
Private Sub Command1_Click()
Text7.Text = 0.025 * Text3.Text
gaji = Text3.Text
tunjangan = Text5.Text
lembur = Text6.Text
pajak = Text7.Text
total = gaji + tunjangan + lembur - pajak
Text9.Text = total
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Option1_Click()
Text3.Text = 2000000
gaji = Text3.Text
End Sub
Private Sub Option2_Click()
Text3.Text = 1750000
gaji = Text3.Text
End Sub
Private Sub Option3_Click()
Text3.Text = 1500000
gaji = Text3.Text
End Sub
Private Sub Option4_Click()
Text5.Text = 200000
tunjangan = Text5.Text
End Sub
Private Sub Option5_Click()
Text5.Text = 150000
tunjangan = Text5.Text
End Sub
Private Sub Option6_Click()
Text5.Text = 100000
tunjangan = Text5.Text
End Sub
Private Sub Text8_Change()
Dim jl As Double
jl = Text8.Text
gaji = Text3.Text
lembur = jl * 1 / 173 * gaji
Text6.Text = lembur
End Sub
Text3.Text = 1750000
gaji = Text3.Text
End Sub
Private Sub Option3_Click()
Text3.Text = 1500000
gaji = Text3.Text
End Sub
Private Sub Option4_Click()
Text5.Text = 200000
tunjangan = Text5.Text
End Sub
Private Sub Option5_Click()
Text5.Text = 150000
tunjangan = Text5.Text
End Sub
Private Sub Option6_Click()
Text5.Text = 100000
tunjangan = Text5.Text
End Sub
Private Sub Text8_Change()
Dim jl As Double
jl = Text8.Text
gaji = Text3.Text
lembur = jl * 1 / 173 * gaji
Text6.Text = lembur
End Sub