tugas vb_2

Image

Private Sub Form_Load()
Combo1.AddItem “11100041”
Combo1.AddItem “11100042”
Combo1.AddItem “11100043”
End Sub
Private Sub Combo1_Change()
Dim NPM, NM, JR As String
NPM = Combo1.Text
    If NPM = “11100041” Then
    NM = “sutiana”
    JR = “S1-SISTEM INFORMASI”
    ElseIf NPM = “11100042” Then
    NM = “fitriani”
    JR = “S1-SISTEM INFORMASI”
    ElseIf NPM = “11100043” Then
    NM = “jumawan”
    JR = “S1-SISTEM INFORMASI”
    End If
Text1.Text = NM
Text2.Text = JR
End Sub

Private Sub Command1_Click()
Dim NQ, NT, UTS, UAS, NA As Integer
Dim HM As String
NQ = Val(Text3.Text)
NT = Val(Text4.Text)
UTS = Val(Text5.Text)
UAS = Val(Text6.Text)
NA = (NQ + NT + UTS + UAS) / 4
    If NA < 51 Then
    HM = “E”
    ElseIf NA < 61 Then
    HM = “D”
    ElseIf NA < 71 Then
    HM = “C”
    ElseIf NA < 81 Then
    HM = “B”
    Else
    HM = “A”
    End If
Text7.Text = NA
Text8.Text = HM
End Sub

Private Sub Command2_Click()
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
Text8.Text = “”
Combo1.Text = “”
Combo1.SetFocus
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Text7_Change()

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