1

I am trying to make a review game in PowerPoint 2007. I would like to be able to have two text fields where, in the show, the person controlling the game would then enter a team name in the two text fields. It would then save the data and then, on the next slide, show the team names on opposite sides of the presentation. I would imagine it would take the input from the text field, save it to a variable, and have a label with the text of that label equal to the input of the text field.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
nmacbook.nick
  • 151
  • 1
  • 7

1 Answers1

0

Before Reading this

  • "SlideX" = the Slide that Stores your Values
  • SlideO = AnySlideNumber

Ok First you want to make 1 slide that is hidden. to change the slide without opening this one you need to use hyperlinks for example, change slides with a Image button with hyperlinks or you could make a Developer Button that changes slide with ActivePresentation.SlideShowWindow.View.GotoSlide (SlideO)

in the one slide that is not hidden that inputs the team names make two labels, that will be editited and name them Like "Team1" and "Team2" or something like that. ok here Double click any of them and you'll get the code for it, just ignore that and paste this

Private Sub Save()
    ' Change X to The Slide that stores the numbers!
    SlideX.SaveValuesIntoText Team1.Caption Team2.Caption
End Sub

after you have done that go a head and Create the Slide that stores the values Eg. the slide where you input your names (p.s. i like your idea) make two Textbox's named "Team1Name" and "Team2Name" with 2 button's (1 = Save, 2 = Nextslide) once you done that also open up thats code and paste this in

Public Function SaveValuesIntoText(Team1 As String, Team2 As String)
    Team1Name.Caption = Team1
    Team2Name.Caption = Team2
End Function

If done correctly you should of had the values saved into the powerpoint slide, and now you can just simple retrieve them with

Private Sub RetrieveValues()
    Team1 = X.Team1Name.Caption
    Team2 = X.Team1Name.Caption
    Label1.Caption = Team1
    Label2.Caption = Team1
End Sub

that should do it. P.s. if you want to retreive the Values Automaticly in the Slide that displays the teams you need to add this Code into it

Public Sub OnSlideShowPageChange(ByVal Wn As SlideShowWindow)
    If Wn.View.CurrentShowPosition = 1 Then
        RetrieveValues
    End If
End Sub

IF THIS DOESNT WORK, i made a syntax error tell me what it is and ill correct it!

Callum
  • 725
  • 6
  • 17