perkalian 20%

Perhitungan Diskon

Private Sub Comhitung_Click()
Dim a, b, c As Double
Txtdiskon.Text = Val(Txtawal.Text) * 0.2
Txtakhir.Text = Val(Txtawal.Text) – Val(Txtdiskon.Text)
End Sub

Private Sub Comkeluar_Click()
End
End Sub

Private Sub Comlagi_Click()
Txtawal.SetFocus
Txtawal.Text = “”
Txtdiskon.Text = “”
Txtakhir.Text = “”
End Sub

 

VISUAL FONT COLOR

VIsual font color

Private Sub Chkbold_Click()

If Chkbold.Value = 1 Then

Label1.FontBold = True

Else

Label1.FontBold = False

End If

End Sub

 

Private Sub Chkitalic_Click()

If Chkitalic.Value = 1 Then

Label1.FontItalic = True

Else

Label1.FontItalic = False

End If

End Sub

 

Private Sub Chksrike_Click()

If Chksrike.Value = 1 Then

Label1.FontStrikethru = True

Else

Label1.FontStrikethru = False

End If

End Sub

 

Private Sub Chkunderline_Click()

If Chkunderline.Value = 1 Then

Label1.FontUnderline = True

Else

Label1.FontUnderline = False

End If

End Sub

 

Private Sub Comexit_Click()

End

End Sub

 

Private Sub Optblue_Click()

Label1.ForeColor = vbBlue

End Sub

 

Private Sub Optgreen_Click()

Label1.ForeColor = vbGreen

End Sub

 

Private Sub Optred_Click()

Label1.ForeColor = vbRed

End Sub

 

Private Sub Optyellow_Click()

Label1.ForeColor = vbYellow

End Sub

TULISKAN NAMA ANDA

Tuliskan Nama ANda font

Private Sub Chkmiring_Click()

Label2.ForeColor = Chkmiring.Value

End Sub

 

Private Sub Chktebal_Click()

Label2.FontBold = Chktebal.Value

End Sub

 

Private Sub Comok_Click()

Label2.Caption = Txt1.Text

End Sub

 

Private Sub Comselesai_Click()

End

End Sub

Private Sub Optbiru_Click()

Label2.ForeColor = vbBlue

End Sub

 

Private Sub Optmerah_Click()

Label2.ForeColor = vbRed

End Sub

PERKALIAN 2 BILANGAN

Perkalian 2 bilangan

Private Sub Combersih_Click()

Txt1.SetFocus

Txt1 = “”

Txt2 = “”

Txthasil = “”

End Sub

 

Private Sub Comhitung_Click()

Txthasil = Val(Txt1.Text) * Val(Txt2.Text)

Combersih.SetFocus

End Sub

 

Private Sub Comkeluar_Click()

End

End Sub

 

Private Sub Txt1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt2.SetFocus

End If

End Sub

Private Sub Txt2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txthasil = Val(Txt1.Text) * Val(Txt2.Text)

Comhitung.SetFocus

End If

End Sub

PERHITUNGAN GAJI

Perhitungan Gaji

Private Sub Comkeluar_Click()

End

End Sub

 

Private Sub Comproses_Click()

Dim gaji, tunjangan, pot, kotor, pajak, diterima As Double

Txtkotor.Text = Val(Txtgaji.Text) + (Txttunjangan.Text) – Val(Txtpot.Text)

Txtpajak.Text = Val(Txtkotor.Text) * (0.1)

Txtditerima.Text = Val(Txtkotor.Text) – Val(Txttunjangan.Text)

 

End Sub

 

Private Sub Comulang_Click()

Txtgaji = “”

Txttunjangan = “”

Txtpot = “”

Txtkotor = “”

Txtpajak = “”

Txtditerima = “”

End Sub

 

Private Sub Txtgaji_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txttunjangan.SetFocus

End If

End Sub

Private Sub Txttunjangan_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtpot.SetFocus

End If

End Sub

PERHITUNGAN DISKON

Perhitungan Diskon

Private Sub Comhitung_Click()

Dim ha, dis, akhir As Double

Txtdis.Text = Val(Txtha.Text) * 0.1

Txtakhir.Text = Val(Txtha.Text) – Val(Txtdis.Text)

End Sub

 

Private Sub Comkeluar_Click()

End

End Sub

 

Private Sub Comulang_Click()

Txtha = “”

Txtdis = “”

Txtakhir = “”

End Sub

Private Sub Txtha_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtdis.SetFocus

End If

End Sub

KETERANGAN NIDN

Keterangan NIDN

Private Sub Cbogolongan_Click()

Dim gp, pajak, tunjangan, td As Variant

Select Case Cbogolongan.Text

Case “I”

gp = 1000000

tunjangan = 100000

Case “II”

gp = 2000000

tunjangan = 200000

Case “III”

gp = 3000000

tunjangan = 300000

Case “IV”

gp = 5000000

tunjangan = 500000

Case Else

gp = 0

tunjangan = 0

End Select

td = gp + tunjangan

pajak = td * 0.1

Txtgp.Text = gp

Txttunjangan.Text = tunjangan

Txtpajak.Text = pajak

Txttd.Text = td – pajak

End Sub

 

Private Sub Combatal_Click()

Txtnind.SetFocus

Txtnind.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgp.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttd.Text = “”

End Sub

 

Private Sub Comkeluar_Click()

Unload Me

End Sub

 

Private Sub Comlagi_Click()

Txtnind.SetFocus

Txtnind.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgp.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttd.Text = “”

End Sub

 

Private Sub Form_Load()

Cbogolongan.AddItem “I”

Cbogolongan.AddItem “II”

Cbogolongan.AddItem “III”

Cbogolongan.AddItem “IV”

End Sub

 

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Cbogolongan.SetFocus

End If

End Sub

 

Private Sub Txtnind_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnama.SetFocus

End If

End Sub