Oh I find an idea! each question is in a textbox shape (on a slide - not for play game), and I will get text from each shape and display in my shape on the slide which is played). So my code is
Public a(4) As Variant
Sub inputquestion()
a(0) = Slide3.Shapes("TextBox 8").TextFrame.TextRange.Text
a(1) = Slide3.Shapes("TextBox 9").TextFrame.TextRange.Text
a(2) = Slide3.Shapes("TextBox 10").TextFrame.TextRange.Text
a(3) = Slide3.Shapes("TextBox 11").TextFrame.TextRange.Text
a(4) = Slide3.Shapes("TextBox 12").TextFrame.TextRange.Text
Slide4.Shapes("TextBox 3").TextFrame.TextRange.Text = a(0)
End Sub
note that the line "Slide4.Shapes("TextBox 3").TextFrame.TextRange.Text = a(0)" for displaying the first question, in next questions, I use a(i), and I need to set it as public
But it doesnt work.
I try a normal variable and it works, but for an array it doesn't
Is the code correct?