![]() |
|
#1
|
|||
|
|||
|
Hi all,
I'm trying to write some code to update a scoreboard on a few slides of a presentation using VBA but I'm getting a bit stuck and wondered if anyone can see what I'm doing wrong? This part works absolutely fine: Code:
Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
If SSW.View.CurrentShowPosition = 8 Then
Dim Team1Scr As String
Dim Team2Scr As String
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
SendKeys ("{ENTER}")
End If
End Sub
Code:
Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
If SSW.View.CurrentShowPosition = 8 Then
Dim Team1Scr As String
Dim Team2Scr As String
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
SendKeys ("{ENTER}")
ElseIf SSW.View.CurrentShowPosition = 16 Then
Dim Team1Scr As String
Dim Team2Scr As String
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
SendKeys ("{ENTER}")
End If
End Sub
Many thanks, Kevin |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Serious help needed. | karlyak22 | Outlook | 0 | 11-13-2011 07:32 AM |
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 |
help needed!!!
|
thunder14 | Word | 1 | 10-17-2009 02:57 PM |
Help needed :)
|
thechief55 | PowerPoint | 1 | 04-28-2009 01:25 PM |