-
Who Wants To Be A Millionaire PP Show
I have a copy of the WWTBAM PowerPoint Presentation that was created by Edward Catchpole. I have tried to contact him, but to no avail. I am trying to get the Phone A Friend lifeline VBA to work. It worked in previous versions of PP, but not since upgrading to MSOFFICE2010. Here is the VBA for it. What happens is the timer appears, but will not rotate as state in the code and note go away. Any help (including the entire PP file if needed) would be appreciated.
[VBA]Public Sub PhoneAFriend()
Dim timerProgress As Shape
Dim timerFigure As Shape
Dim timerProgressbg As Shape
Dim timerEndCall As Shape
Dim timerStart As Long
Dim timerEnd As Long
Dim thisTick As Long
Dim rotation As Single
If pafInProgress = True Then Exit Sub
If ViewingCorrect = True Then Exit Sub
Set timerProgress = SlideShape(QuestionSlide, "timerprogress")
Set timerFigure = SlideShape(QuestionSlide, "timerfigure")
Set timerProgressbg = SlideShape(QuestionSlide, "timerprogressbg")
Set timerEndCall = SlideShape(QuestionSlide, "cancelpaf")
cancelPAF = False
pafInProgress = True
CurrentPAF = CurrentPAF + 1
'set PAF symbol invisible
Call PlaySound(PresPath & "\Audio\PAF_CLOCK.wav", 0, SND_ASYNC + SND_FILENAME)
Sleep (1000)
SlideShape(QuestionSlide, "PAF").Left = -250
timerProgress.Left = 269.25
timerFigure.Left = 269.25
timerProgressbg.Left = 269.25
timerEndCall.Left = 233.125
timerStart = GetTickCount()
timerEnd = timerStart + 30000
thisTick = GetTickCount()
Do While cancelPAF = False
thisTick = GetTickCount()
rotation = ((timerEnd - thisTick) / 30000) * 180 'PowerPoint makes 180 scale to 360 for some reason
If thisTick < timerEnd Then
timerProgress.Adjustments.Item(1) = rotation - 90
timerProgress.rotation = -rotation
Else
timerProgress.Adjustments.Item(1) = 90.1
timerProgress.rotation = 180
Exit Do
End If
Dim newTime As Integer
newTime = (timerEnd - thisTick) / 1000 'Time in seconds remaining
If timerFigure.TextFrame.TextRange.Text <> newTime Then
timerFigure.TextFrame.TextRange.Text = newTime
End If
DoEvents
Loop
timerProgress.Left = -500
timerFigure.Left = -500
timerProgressbg.Left = -500
timerEndCall.Left = -500
pafInProgress = False
Sleep (3000)
Call PlayBGM(True)
End Sub[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules