P
Preschool Mike
I'm trying to come up with a way for my printable page to display the correct
answers to the questions on my test that are answered wrong. Each question
has two wrong answer choices and on right answer choice button. Here is a
sample of my code. Currently all I can come up with is for it to just say
that "This is not the correct answer". I'd like for it to say what the
answer should have been. I did come up with a way by naming each slide the
correct answer but that won't work if more than question has the same answer
(e.g., question 1 & 2 the answer is 4 ). Is there a way I can tie it to the
..text or .name of the right answer button using the format I’m using below?
And also does anyone know why I (3 times out of 5) get error messages
(Service Temporarily Unavailable or An error occurred while sending your
post) when using this service?
Dim AnswerIs() As String
Sub Initialize()
Dim i As Long
MoveObjectsHome
TestName =
ActivePresentation.Slides(1).Shapes("TestNameBox").TextFrame.TextRange.Text
numCorrect = 0
numIncorrect = 0
printableSlideNum = ActivePresentation.Slides.Count + 1
numQuestions = ActivePresentation.Slides.Count - 2
ReDim qAnswered(numQuestions)
ReDim answer(numQuestions)
ReDim AnswerIs(numQuestions)
For i = 1 To numQuestions
qAnswered(i) = False
Next i
End Sub
Sub WrongAnswerButton(answerButton As Shape)
Dim thisQuestionNum As Long
thisQuestionNum = _
ActivePresentation.SlideShowWindow.View.Slide.SlideIndex - 1
answer(thisQuestionNum) = answerButton.TextFrame.TextRange.Text
WrongAnswer
End Sub
Sub WrongAnswer()
Dim thisQuestionNum As Long
thisQuestionNum = _
ActivePresentation.SlideShowWindow.View.Slide.SlideIndex - 1
If qAnswered(thisQuestionNum) = False Then
numIncorrect = numIncorrect + 1
End If
qAnswered(thisQuestionNum) = True
AnswerIs(thisQuestionNum) = "- This is not the right answer." 'instead
of saying this I want it to say what the correct answer is on my printable
slide.
ActivePresentation.SlideShowWindow.View.Next
End Sub
Thanks,
answers to the questions on my test that are answered wrong. Each question
has two wrong answer choices and on right answer choice button. Here is a
sample of my code. Currently all I can come up with is for it to just say
that "This is not the correct answer". I'd like for it to say what the
answer should have been. I did come up with a way by naming each slide the
correct answer but that won't work if more than question has the same answer
(e.g., question 1 & 2 the answer is 4 ). Is there a way I can tie it to the
..text or .name of the right answer button using the format I’m using below?
And also does anyone know why I (3 times out of 5) get error messages
(Service Temporarily Unavailable or An error occurred while sending your
post) when using this service?
Dim AnswerIs() As String
Sub Initialize()
Dim i As Long
MoveObjectsHome
TestName =
ActivePresentation.Slides(1).Shapes("TestNameBox").TextFrame.TextRange.Text
numCorrect = 0
numIncorrect = 0
printableSlideNum = ActivePresentation.Slides.Count + 1
numQuestions = ActivePresentation.Slides.Count - 2
ReDim qAnswered(numQuestions)
ReDim answer(numQuestions)
ReDim AnswerIs(numQuestions)
For i = 1 To numQuestions
qAnswered(i) = False
Next i
End Sub
Sub WrongAnswerButton(answerButton As Shape)
Dim thisQuestionNum As Long
thisQuestionNum = _
ActivePresentation.SlideShowWindow.View.Slide.SlideIndex - 1
answer(thisQuestionNum) = answerButton.TextFrame.TextRange.Text
WrongAnswer
End Sub
Sub WrongAnswer()
Dim thisQuestionNum As Long
thisQuestionNum = _
ActivePresentation.SlideShowWindow.View.Slide.SlideIndex - 1
If qAnswered(thisQuestionNum) = False Then
numIncorrect = numIncorrect + 1
End If
qAnswered(thisQuestionNum) = True
AnswerIs(thisQuestionNum) = "- This is not the right answer." 'instead
of saying this I want it to say what the correct answer is on my printable
slide.
ActivePresentation.SlideShowWindow.View.Next
End Sub
Thanks,