Brightspark9
05-04-2017, 02:20 AM
Hello,
I have a powerpoint presentation.
Slide 1 opens a messagebox asking for a username. The username is transferred to a certificate of completion on slide 19. This works fine.
Sub test()Dim x As String
x = InputBox("Please Enter Your Name", Name)
ActivePresentation.Slides(19).Shapes.Title.TextFrame.TextRange = x
SlideShowWindows(1).View.Next
End Sub
I would like to add a counter which would be displayed on slide 18. The counter would indicate how many correct answers had been selected during the slideshow.
If the required number was not achieved the show would bypass the certificate (slide19) and go directly to (slide20).
I have tried the following without success.
Sub test()Dim x As String
Dim Count As Integer
Count = 0
x = InputBox("Please Enter Your Name", Name)
ActivePresentation.Slides(18).Shapes.Title.TextFrame.TextRange = Count
ActivePresentation.Slides(19).Shapes.Title.TextFrame.TextRange = x
SlideShowWindows(1).View.Next
End Sub
code for correct click
Sub Right()
Count = Count + 1
MsgBox "Correct Answer. Well Done!"
SlideShowWindows(1).View.Next
End Sub
Many Thanks
I have a powerpoint presentation.
Slide 1 opens a messagebox asking for a username. The username is transferred to a certificate of completion on slide 19. This works fine.
Sub test()Dim x As String
x = InputBox("Please Enter Your Name", Name)
ActivePresentation.Slides(19).Shapes.Title.TextFrame.TextRange = x
SlideShowWindows(1).View.Next
End Sub
I would like to add a counter which would be displayed on slide 18. The counter would indicate how many correct answers had been selected during the slideshow.
If the required number was not achieved the show would bypass the certificate (slide19) and go directly to (slide20).
I have tried the following without success.
Sub test()Dim x As String
Dim Count As Integer
Count = 0
x = InputBox("Please Enter Your Name", Name)
ActivePresentation.Slides(18).Shapes.Title.TextFrame.TextRange = Count
ActivePresentation.Slides(19).Shapes.Title.TextFrame.TextRange = x
SlideShowWindows(1).View.Next
End Sub
code for correct click
Sub Right()
Count = Count + 1
MsgBox "Correct Answer. Well Done!"
SlideShowWindows(1).View.Next
End Sub
Many Thanks