VBA Express Forum  
Google
 




Go Back   VBA Express Forum > VBA Code & Other Help > PowerPoint Help
     Feedback     
Register FAQ Members Arcade KBase Articles

Reply
 
Thread Tools Display Modes
Old 06-24-2010, 12:29 AM   #1
m_siepel

 
Joined: Sep 2009
Posts: 2
Kb Entries: 0
Articles: 0
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 tags courtesy of www.thecodenet.com

Local Time: 10:14 PM
Local Date: 09-08-2010
Location:

 
Reply With Quote Top
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Debt Help | Find jobs | Debt Management | Submit articles | Canon G11


All times are GMT -4. The time now is 11:14 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright @2004 - 2009 VBA Express