- Joined
- Mar 12, 2015
- Messages
- 1
- Reaction score
- 0
Hi there, I'm currently working on making a game for one of my schools and I can't quite get the VBA working. I took the code out of another powerpoint, which although works fine in the other powerpoint, I am having trouble getting it to function in this one.
Here is a screen shot of the scoreboard:
When I click the upwards arrow beside 'OdaAtt' (the selected box) I want it the score increase by 1 point. Likewise when I hit the down arrow I want the score to decrease by one.
The code I am using is as follows:
Option Explicit
Dim scoreOdaAtt As Long
Sub Add1OdaAtt()
scoreOdaAtt = scoreOdaAtt + 1
UpdateScores
End Sub
Sub Minus1OdaAtt()
scoreOdaAtt = scoreOdaAtt - 1
UpdateScores
End Sub
Sub UpdateScores()
ActivePresentation.Slides("Slide7").Shapes("OdaAtt").TextFrame.TextRange.Te xt = scoreOdaAtt
End Sub
I would really appreciate any help anyone can offer!!
Thanks in advance!
Here is a screen shot of the scoreboard:
When I click the upwards arrow beside 'OdaAtt' (the selected box) I want it the score increase by 1 point. Likewise when I hit the down arrow I want the score to decrease by one.
The code I am using is as follows:
Option Explicit
Dim scoreOdaAtt As Long
Sub Add1OdaAtt()
scoreOdaAtt = scoreOdaAtt + 1
UpdateScores
End Sub
Sub Minus1OdaAtt()
scoreOdaAtt = scoreOdaAtt - 1
UpdateScores
End Sub
Sub UpdateScores()
ActivePresentation.Slides("Slide7").Shapes("OdaAtt").TextFrame.TextRange.Te xt = scoreOdaAtt
End Sub
I would really appreciate any help anyone can offer!!
Thanks in advance!