Tuesday, December 7, 2010
Mathematic Quiz : Number Patterns
Yeah.. Math Quiz is complete! It's very simple application made by Microsoft Office PowerPoint 2007, using VBA. The Quiz is about Number Patterns
'--BEGIN CODE--'
Private Sub CommandButton1_Click()
If TextBox1.Value = "'--CORRECT ANSWER--'" Then
MsgBox ("That's True! Excellent! Let's see the solution...."), 0, ("Math Quiz")
ActivePresentation.SlideShowWindow.View.GotoSlide '--SOLUTION SLIDE--'
Else
If TextBox1.Value = "" Then
MsgBox ("Hey! Don't leave it blank!"), 0, ("Math Quiz")
Else
MsgBox ("Oh, it's false! Sorry! Let's see the solution...."), 0, ("Math Quiz")
ActivePresentation.SlideShowWindow.View.GotoSlide '--SOLUTION SLIDE--'
End If
End If
TextBox1.Value = ""
End Sub
The first slide is Question Select:
Next is the question:
Finally, the solution:

I made 15 question, you can modify it as you wish! ;)
The VBA code is only on the question slide (TextBox and CommandButton), the code is:
Next is the question:
Finally, the solution:
I made 15 question, you can modify it as you wish! ;)
The VBA code is only on the question slide (TextBox and CommandButton), the code is:
'--BEGIN CODE--'
Private Sub CommandButton1_Click()
If TextBox1.Value = "'--CORRECT ANSWER--'" Then
MsgBox ("That's True! Excellent! Let's see the solution...."), 0, ("Math Quiz")
ActivePresentation.SlideShowWindow.View.GotoSlide '--SOLUTION SLIDE--'
Else
If TextBox1.Value = "" Then
MsgBox ("Hey! Don't leave it blank!"), 0, ("Math Quiz")
Else
MsgBox ("Oh, it's false! Sorry! Let's see the solution...."), 0, ("Math Quiz")
ActivePresentation.SlideShowWindow.View.GotoSlide '--SOLUTION SLIDE--'
End If
End If
TextBox1.Value = ""
End Sub
Download the example here.
Subscribe to:
Post Comments (Atom)
Blog Archive
About Me
- Habib Fikri
- Garut, Jawa Barat, Indonesia
- You know my name. If you want to know me more, contact me ^^

0 comments:
Post a Comment