Dim nilai As Integer
Dim konfirmasi As String
Dim hitung As Integer
Dim hitungx As Integer
Dim kkm As Integer
Dim persen As Integer
Dim nama As String
Dim nis As String
Sub mulai()
nilai = 0
hitung = 0
kkm = 75
nama = InputBox("Masukkan nama lengkap anda")
nis = InputBox("Masukkan Nomor Induk
Siswa Anda")
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub benar()
konfirmasi = MsgBox("yakin dengan jawaban
anda ?", vbYesNo, " Cek Jawaban '")
If konfirmasi = vbYes Then
nilai = nilai + 1
hitung = hitung + 1
ActivePresentation.SlideShowWindow.View.Next
End If
End Sub
Sub salah()
konfirmasi = MsgBox("yakin dengan jawaban
anda ?", vbYesNo, " Cek Jawaban '")
If konfirmasi = vbYes Then
hitung = hitung + 1
ActivePresentation.SlideShowWindow.View.Next
End If
End Sub
Sub jawab()
ActivePresentation.SlideShowWindow.View.Next
persen = (nilai * 100) / hitung
hitungx = hitung - nilai
tampilkan
End Sub
Sub tampilkan()
With ActivePresentation.Slides(19)
If persen >= kkm Then
.Shapes(1).TextFrame.TextRange.Text =
"Selamat " & nama & " anda lulus "
Else
.Shapes(1).TextFrame.TextRange.Text =
"Mohon Maaf " & nama & " anda Remidial "
End If
.Shapes(2).TextFrame.TextRange.Text = kkm
.Shapes(3).TextFrame.TextRange.Text = nis
.Shapes(4).TextFrame.TextRange.Text = nama
.Shapes(5).TextFrame.TextRange.Text = persen
.Shapes(6).TextFrame.TextRange.Text = nilai
.Shapes(7).TextFrame.TextRange.Text = hitung
.Shapes(8).TextFrame.TextRange.Text = hitungx
End With
End Sub
Tidak ada komentar:
Posting Komentar