TUGAS 5

TUGAS 5 ADEL

Private Sub Cmdproses_Click()
Dim S, A, B, kelas, jurusan, program, tahun As String
S = Left(Txtnpm.Text, 1)
If S = “E” Then
kelas = “Eksekutif”
pendaftaran = “200000”
bangunan = “1250000”
ElseIf S = “R” Then
kelas = “Reguler”
pendaftaran = “150000”
bangunan = “1000000”
End If
Txtkelas.Text = kelas
Txtuangpendaftaran.Text = pendaftaran
Txtuangbangunan.Text = bangunan
Txttahun.Text = “20” & Mid(Txtnpm.Text, 3, 2)
A = Mid(Txtnpm.Text, 5, 1)
If A = “1” Then
jurusan = “Sistem Informasi”
ElseIf A = “2” Then
jurusan = “Manajemen Informatika”
ElseIf A = “3” Then
jurusan = “Manajemen dan Komputer Akuntansi”
End If
Txtjurusan.Text = jurusan
B = Mid(Txtnpm.Text, 6, 2)
Txtpropti.Text = “600000”
If B = “01” Then
program = “Strata Satu”
pendidikan = “1900000”
ElseIf B = “02” Then
program = “Diploma Tiga”
pendidikan = “1650000”
ElseIf B = “03” Then
program = “Diploma Satu”
pendidikan = “13500000”
End If
Txtprogram.Text = program
Txtbiaya.Text = pendidikan
Txtnurut.Text = Right(Txtnpm.Text, 3)
pendaftaran = Val(Txtuangpendaftaran.Text)
semester = Val(Txtbiaya.Text)
bangunan = Val(Txtuangbangunan.Text)
almamater = Val(Txtpropti.Text)
total = Val(pendaftaran + semester + bangunan + almamater)
Txttotal.Text = total
End Sub

Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtkelas.Text = “”
Txtjurusan.Text = “”
Txtprogram.Text = “”
Txttahun.Text = “”
Txtnurut.Text = “”
Txtuangpendaftaran.Text = “”
Txtbiaya.Text = “”
Txtuangbangunan.Text = “”
Txtpropti.Text = “”
Txttotal.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtkelas.Text = “”
Txtjurusan.Text = “”
Txtprogram.Text = “”
Txttahun.Text = “”
Txtnurut.Text = “”
Txtuangpendaftaran.Text = “”
Txtbiaya.Text = “”
Txtuangbangunan.Text = “”
Txtpropti.Text = “”
Txttotal.Text = “”
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