1. Start WPS Demo and create a new presentation, select "Content layout/blank" In the list of layouts below the Slide Layout task pane on the right. Click the Insert menu, select the text box/landscape command, click a text box in the slide edit area, enter quiz, and set the font, font size, position, and so on. Use the same method to insert a text box again, type "Please enter your name:" and set its properties.
2. Select the text Box tool in the Control Toolbox (if the Control Toolbox is not open, you can work from the menu View/toolbar/Control Toolbox, when the mouse changes to a cross, in the "Please enter your name:" Right press the left mouse button and drag out an appropriate rectangle; Select the command button tool, Drag a command button under the text box and right-click, select Properties from the shortcut menu that pops up, open the Properties dialog box, change the Caption property to OK, and the other defaults. As shown in Figure 1.
Figure 1
3, click Insert/New slide in the menu bar, follow the steps of Step 1, make the new slide layout blank, then insert a text box, and enter the question in the text box, for example: 1+1=? Insert 3 text boxes below the question, enter "A, 1", "B, 2", "C, 3", respectively.
Repeat the above steps as necessary until you have added all the questions.
4, select the first slide, double-click the command button to open the VBA editing window, delete all the contents of the window, and enter the following complete code:
Dim uname as String
Sub SS ()
uname = TextBox1.Text
End Sub
Sub Right ()
Ss
MsgBox "Congratulations on your answer!" & uname
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Endright ()
Ss
MsgBox "Congratulations, you're all right!" & uname
End Sub
Sub wrong ()
MsgBox "Your answer is wrong, please come again!" & uname
End Sub
Private Sub CommandButton1_Click ()
Ss
If uname = "" Then
MsgBox "Please enter your name:"
Else
ActivePresentation.SlideShowWindow.View.Next
End If
End Sub
5, select the question page, set options, right click Options, select the Action Settings command on the pop-up shortcut menu, open the Action Settings dialog box, select the Click tab, select Run macro, click the button under Run macro, and select Right in the pop-up menu (if the option is wrong "Wrong"), as shown in Figure 2, and then click OK to exit the dialog box.
Figure 2
Set the other options in the same way. The last question of the correct option for the Run macro selects "Endright".
6, click the menu bar slide Show/Slide Transition command, open the Slide Transition task pane, in the Swap mode area, remove the check before click, and then click Apply to All Slides button. As shown in Figure 3.
Figure 3
Now the whole quiz presentation is done. Press the F5 shortcut key to experience it.