TUGAS 3 KODE PROGRAM

Private Sub cbonpm_Click()

Select Case cbonpm.Text

Case “10100001”

nama = “I Nyoman Agus Hermawan”

jurusan = “Sistem Informasi”

Case “10200002”

nama = “Yusuf Cahyo”

jurusan = “Manajemen Informatika”

Case “10300003”

nama = “Eva Riyana Abun”

jurusan = “Teknik Informatika”

Case “10100004”

nama = “Eva Maulana”

jurusan = “Sistem Informasi”

Case “10200005”

nama = “Desi Purnamasari”

jurusan = “Manajemen Informatika”

Case “10300006”

nama = “Fiqih Satria”

jurusan = “Teknik Informatika”

Case “10100007”

nama = “Nugroho Dwi Yus Panggi”

jurusan = “Sistem Informasi”

Case “10200008”

nama = “Aga Kusuma”

jurusan = “Manajemen Informatika”

Case “10300009”

nama = “Ike Diah Wulandari”

jurusan = “Teknik Informatika”

Case “10200010”

nama = “Heri Muriyanto”

jurusan = “Manajemen Informasi”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan

txtnq.SetFocus

End Sub

Private Sub cmdbatal_Click()

txtnq.SetFocus

txtnq = “”

txtnt = “”

txtuts = “”

txtuas = “”

txtnama = “”

txtjurusan = “”

cbonpm = “”

txtna = “”

txthm = “”

End Sub

Private Sub cmdkeluar_Click()

Unload Me

End Sub

Private Sub cmdproses_Click()

Dim Nilaiakhir As Integer

Dim hurufmutu As String

nilai1 = Val(txtnq.Text)

nilai2 = Val(txtnt.Text)

nilai3 = Val(txtuts.Text)

nilai4 = Val(txtuas.Text)

Nilaiakhir = (nilai1 + nilai2 + nilai3 + nilai4) / 4

txtna.Text = Nilaiakhir

If Val(txtna.Text) >= 76 Then

txthm.Text = “A”

End If

If Val(txtna.Text) < 76 Then

txthm.Text = “B”

End If

If Val(txtna.Text) < 66 Then

txthm.Text = “C”

End If

If Val(txtna.Text) < 56 Then

txthm.Text = “D”

End If

If Val(txtna.Text) < 46 Then

txthm.Text = “E”

End If

End Sub

Private Sub Form_Load()

cbonpm.AddItem “10100001”

cbonpm.AddItem “10200002”

cbonpm.AddItem “10300003”

cbonpm.AddItem “10100004”

cbonpm.AddItem “10200005”

cbonpm.AddItem “10300006”

cbonpm.AddItem “10100007”

cbonpm.AddItem “10200008”

cbonpm.AddItem “10300009”

cbonpm.AddItem “10200010”

End Sub

Private Sub txtnq_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnt.SetFocus

End If

End Sub

Private Sub txtnt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuts.SetFocus

End If

End Sub

Private Sub txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuas.SetFocus

End If

End Sub


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 )

Gambar Twitter

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

Foto Facebook

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

Foto Google+

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

Connecting to %s

%d blogger menyukai ini: