Learn how to make an interactive quiz in OpenOffice Impress using a macro and the InputBox function! 🎉
How to write a macro using InputBox
How to compare the user’s answer
How to show correct or wrong messages using MsgBox
Step-by-step explanation with comments 📝
Perfect for teachers, students, and anyone who wants to start with OpenOffice macros! No coding experience is needed.
Here is the code.
Sub CheckAnswerFromInputBox
Dim userInput As String
Dim correctAnswer As String
correctAnswer = "5"
userInput = InputBox("Enter your answer:", "Check Answer")
If Trim(userInput) = correctAnswer Then
MsgBox "✅ Correct!", 64, "Result"
Else
MsgBox "❌ Wrong answer!", 16, "Result"
End If
End Sub
previous Macro video link is https://youtu.be/ZY11UPJYKQY
Download
0 formats
No download links available.
Create a Simple Quiz in OpenOffice Impress Using Macros | InputBox Tutorial for Beginners | NatokHD