Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-13-2011, 08:28 AM
JohnWilson JohnWilson is offline Powerpoint VBA: Help Needed Windows 7 64bit Powerpoint VBA: Help Needed Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You shouldn't have duplicate declarations in one module.

Try this using Select case
Code:
Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
Dim Team1Scr As String
Dim Team2Scr As String
Select Case SSW.View.CurrentShowPosition

Case Is = 8
Team1Scr = InputBox("Enter Team 1 Score:", "Scores")
ActivePresentation.Slides(8).Shapes("Scr1").TextFrame.TextRange.Text = Team1Scr
Team2Scr = InputBox("Enter Team 2 Score:", "Scores")
ActivePresentation.Slides(8).Shapes("Scr2").TextFrame.TextRange.Text = Team2Scr

 
Case Is = 16
Team1Scr = InputBox("Enter Team 1 Score:", "Scores")
ActivePresentation.Slides(16).Shapes("Scr1").TextFrame.TextRange.Text = Team1Scr
Team2Scr = InputBox("Enter Team 2 Score:", "Scores")
ActivePresentation.Slides(16).Shapes("Scr2").TextFrame.TextRange.Text = Team2Scr
    
End Select
    
End Sub
A word of warning OnSlideShowPageChange is NOT a reliable method and not supported/documented by Microsoft. Before using it in an important setting try saving, close PowerPoint and reopen. Does it still work??

I've removed theSendKeys lines. What were they for? The effect would be to move on to the next slide or animation.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Serious help needed. karlyak22 Outlook 0 11-13-2011 07:32 AM
Powerpoint VBA: Help Needed Frontpage help needed ytryity Misc 1 03-19-2011 09:07 AM
Needed help with MSI Package ahaseeb Outlook 0 01-17-2011 10:19 PM
Powerpoint VBA: Help Needed help needed!!! thunder14 Word 1 10-17-2009 02:57 PM
Powerpoint VBA: Help Needed Help needed :) thechief55 PowerPoint 1 04-28-2009 01:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft