Tugas 10 Biaya Kuliah Total

source code :Untitled

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 )

w

Connecting to %s