Program 3. Mencari Huruf Mutu Mahasiswa dengan Proses button

tugasbaru3.1

tugasbaru3.22

Private Sub Cbonpm_Click()

Dim nama, jurusan, HM As String

 

Select Case Cbonpm.Text

Case “15100030”

nama = “HERMIN SUKMIATI”

jurusan = “Sistem Informasi”

Case “15100031”

nama = “ARTIKA KUSTRIYANI”

jurusan = “Sistem Informasi”

Case “15100007”

nama = “DESI YULIANTI”

jurusan = “Manajemen Informatika”

End Select

txtNM.Text = nama

txtjurusan.Text = jurusan

txtquis.SetFocus

End Sub

 

Private Sub cmdbatal_Click()

Cbonpm.SetFocus

Cbonpm.Text = “”

txtNM.Text = “”

txtjurusan.Text = “”

txtquis.Text = “”

txttugas.Text = “”

txtuts.Text = “”

txtuas.Text = “”

txtna.Text = “”

txthm.Text = “”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub cmdproses_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(txtquis.Text)

TUGAS = Val(txttugas.Text)

UTS = Val(txtuts.Text)

UAS = Val(txtuas.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

txtna.Text = NA

 

Select Case txtna.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is < 50

HM = “E”

End Select

txthm.Text = HM

 

End Sub

 

Private Sub Form_Load()

Cbonpm.AddItem “15100030”

Cbonpm.AddItem “15100031”

Cbonpm.AddItem “15100007”

 

End Sub

 

Private Sub txtquis_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

 

End Sub

 

Private Sub txttugas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuts.SetFocus

End If

 

End Sub

 

Private Sub txtuas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtna.SetFocus

End If

 

End Sub

 

Private Sub txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuas.SetFocus

End If

 

End Sub

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