Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim namasiswa As String
Dim Nilaiagama, Nilaipkn, Nilaibahasaindonesia, Nilaibahasainggris, Nilaimat, Nilaifisika, Nilaibiologi, Nilaigeografi, Nilaisejarah, Nilaiekonomi, Nilaisenbud, Nilaipenjaskes, Nilaitik, Nilaiplkj, Nilaijtn, Nilaibahasamandarin As Single
namasiswa = InputBox(“inputkan nama siswa”, “nama siswa”)
TextBox1.Text = namasiswa
Nilaiagama = InputBox(“inputkan nilai agama”, “nilai agama”)
TextBox2.Text = Nilaiagama
Nilaipkn = InputBox(“inputkan nilai pkn”, “nilai pkn”)
TextBox3.Text = Nilaipkn
Nilaibahasaindonesia = InputBox(“inputkan nilai bahasa indonesia”, “nilai bahasa indonesia”)
TextBox4.Text = Nilaibahasaindonesia
Nilaibahasainggris = InputBox(“inputkan nilai bahasa inggris”, “nilai bahasa inggris”)
TextBox5.Text = Nilaibahasainggris
Nilaimat = InputBox(“inputkan nilai matematika”, “nilai matematika”)
TextBox6.Text = Nilaimat
Nilaifisika = InputBox(“inputkan nilai fisika”, “nilai fisika”)
TextBox7.Text = Nilaifisika
Nilaibiologi = InputBox(“inputkan nilai biologi”, “nilai biologi”)
TextBox8.Text = Nilaibiologi
Nilaigeografi = InputBox(“inputkan nilai geografi”, “nilai geografi”)
TextBox9.Text = Nilaigeografi
Nilaisejarah = InputBox(“inputkan nilai sejarah”, “nilai sejarah”)
TextBox10.Text = Nilaisejarah
Nilaiekonomi = InputBox(“inputkan nilai ekonomi”, “nilai ekonomi”)
TextBox11.Text = Nilaiekonomi
Nilaisenbud = InputBox(“inputkan nilai seni budaya”, “nilai seni budaya”)
TextBox12.Text = Nilaisenbud
Nilaipenjaskes = InputBox(“inputkan nilai penjaskes”, “nilai penjaskes”)
TextBox13.Text = Nilaipenjaskes
Nilaitik = InputBox(“inputkan nilai TIK”, “nilai TIK”)
TextBox14.Text = Nilaitik
Nilaiplkj = InputBox(“Inputkan nilai PLKJ”, “nilai PLKJ”)
TextBox15.Text = Nilaiplkj
Nilaijtn = InputBox(“inputkan nilai JTN”, “nilai JTN”)
TextBox16.Text = Nilaijtn
Nilaibahasamandarin = InputBox(“inputkan nilai bahasa mandarin”, “nilai bahasa mandarin”)
TextBox17.Text = Nilaibahasamandarin
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ” ”
TextBox2.Text = ” ”
TextBox3.Text = ” ”
TextBox4.Text = ” ”
TextBox5.Text = ” ”
TextBox6.Text = ” ”
TextBox7.Text = ” ”
TextBox8.Text = ” ”
TextBox9.Text = ” ”
TextBox10.Text = ” ”
TextBox11.Text = ” ”
TextBox12.Text = ” ”
TextBox13.Text = ” ”
TextBox14.Text = ” ”
TextBox15.Text = ” ”
TextBox16.Text = ” ”
TextBox17.Text = ” ”
TextBox18.Text = ” ”
TextBox19.Text = ” ”
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox18.Text = (Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text) + Val(TextBox9.Text) + Val(TextBox10.Text) + Val(TextBox11.Text) + Val(TextBox12.Text) + Val(TextBox13.Text) + Val(TextBox14.Text) + Val(TextBox15.Text) + Val(TextBox16.Text) + Val(TextBox17.Text)) / 16
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TextBox19.Text = (Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text) + Val(TextBox9.Text) + Val(TextBox10.Text) + Val(TextBox11.Text) + Val(TextBox12.Text) + Val(TextBox13.Text) + Val(TextBox14.Text) + Val(TextBox15.Text) + Val(TextBox16.Text) + Val(TextBox17.Text))
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
End
End Sub
End Class