TUGAS 4 yang ke10

LINTANG10

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

txtkelas.Text = “”

txtjur.Text = “”

txtprodi.Text = “”

txttm.Text = “”

txtnu.Text = “”

txtup.Text = “”

txtbps.Text = “”

txtub.Text = “”

txtbp.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

txtkelas.Text = “”

txtjur.Text = “”

txtprodi.Text = “”

txttm.Text = “”

txtnu.Text = “”

txtup.Text = “”

txtbps.Text = “”

txtub.Text = “”

txtbp.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

 

S = Left(Txtnpm, 1)

If S = “E” Then

txtkelas.Text = “Eksekutif”

txtub.Text = “1250000”

ElseIf S = “R” Then

txtkelas.Text = “Reguler”

txtub.Text = “1000000”

End If

S = Mid(Txtnpm, 6, 2)

If S = “00” Then

txtprodi.Text = “Strata Satu”

If txtkelas.Text = “Reguler” Then

txtbps.Text = “1500000”

Else

txtbps.Text = “1900000”

End If

ElseIf S = “01” Then

txtprodi.Text = “Diploma Tiga”

If txtkelas.Text = “Reguler” Then

txtbps.Text = “1250000”

Else

txtbps.Text = “1650000”

End If

ElseIf S = “02” Then

txtprodi.Text = “Diploma Satu”

If txtkelas.Text = “Reguler” Then

txtbps.Text = “1250000”

Else

txtbps.Text = “1350000”

End If

End If

 

S = Mid(Txtnpm, 5, 1)

If S = “1” Then

txtjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

txtjur.Text = “Manajemen Informatika”

ElseIf S = “3” Then

txtjur.Text = “Manajemendan Komp. Akuntansi”

End If

 

txttm.Text = “20” & Mid(Txtnpm.Text, 3, 2)

txtnu.Text = Right(Txtnpm, 3)

If txtprodi.Text = “Strata Satu” Then

txtup.Text = “200000”

txtbp.Text = “600000”

Else

If txtprodi.Text = “Diploma Tiga” Then

txtup.Text = “150000”

txtbp.Text = “600000”

Else

If txtprodi.Text = “Diploma Satu” Then

txtup.Text = “150000”

txtbp.Text = “600000”

End If

End If

End If

txttotal.Text = Val(txtup.Text) + Val(txtbps.Text) + Val(txtub.Text) + Val(txtbp.Text)

End Sub

 

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

 

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s