tugas 1

IMG_20160103_214044

 

Public Sub kosong()

txtnidn.SetFocus

txtnidn.Text = “”

Txtnama.Text = “”

Cbogol.Text = “”

Txtgapok.Text = “”

Txttun.Text = “”

Txtpjk.Text = “”

Txttot.Text = “”

End Sub

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cbogol_Click()

Dim gapok, pajak, tunjangan, total As Variant

Select Case Cbogol.Text

Case “I”

gapok = 1500000

tunjangan = 150000

Case “II”

gapok = 2000000

tunjangan = 200000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 3000000

tunjangan = 300000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

Txtgapok.Text = gapok

Txttun.Text = tunjangan

Txtpjk.Text = pajak

Txttot.Text = total – pajak

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

Advertisements
Standard

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s