Question: I am trying to make a quiz game in Powerpoint.

I've added a textbox in the slide. How do I write a code so that the text inputted in it is recognized to a previously written text?

Example:

* Question: What is the capital of India?

In the textbox present... the user types '`New Delhi`' (which is the correct answer). They should be redirected to the next slide.

or

If the user types '`Mumbai`' (which is the wrong answer); they should get redirected to the previous slide.

Answer: 
To read the text from an ActiveX text box, you use the text box shape's
.OLEFormat.Object.Text property. Here's a small example:

```
Function ReadActiveXTextBox(oSh As Shape) As String
    With oSh.OLEFormat.Object
        MsgBox .Text
    End With
End Function

Sub TestTheFunction()
' Put an activex textbox on slide 1
' Make sure its name is TextBox1
' Add another shape, give it an action setting of Run Macro: TestTheFunction
' Put the presentation in slideshow view,type something into the text box, then
'   click the other shape with the macro setting
    MsgBox ReadActiveXTextBox(ActivePresentation.Slides(1).Shapes("TextBox1"))
End Sub

```
In response to your question, I believe you will find your answer if you watch the below video.

I asked a similar question three months ago while creating a quiz in powerpoint.

<https://www.youtube.com/watch?v=3WbJCGoSzhU&feature=youtu.be>

good luck

CBiscuit