title: PowerPoint How to Run Macro and Hyperlink at The Same Time?
body: <p>I'm trying to make a choose your own type of game in powerpoint. The game includes a point system that I did using a macro when the user is clicks an option. I also need a hyperlink to jump to the right slide in accordance to the option that was picked. </p>
  
  <p>I tried creating 1 macro for every button, assigning where to slide to jump to, but this becomes solution way too messy since, by the end of the game, there would be hundreds of buttons = hundreds of macro.</p>
  
  <pre><code>Dim numCorrect As Integer
  Dim numIncorrect As Integer
  Dim userName As String
  Dim printableSlideNum As Long 'ADDED
  Sub GetStarted()
      Initialize
      ActivePresentation.SlideShowWindow.View.Next
  End Sub
  Sub Initialize()
      numCorrect = 0
      numIncorrect = 0
      ActivePresentation.SlideShowWindow.View.Next
  End Sub
  Sub Right()
      numCorrect = numCorrect + 10
  End Sub
  Sub Wrong()
      numIncorrect = numIncorrect + 25
  End Sub
  Sub Feedback()
      MsgBox "You spent " &amp; numCorrect + numIncorrect &amp; " minutes to solve the issue" &amp; vbCr &amp; _
      "Out of the " &amp; numCorrect + numIncorrect &amp; ", you wasted " &amp; numIncorrect &amp; " minutes by choosing the wrong options"
  End Sub
  Sub JumpTo(lSlideIndex As Long)
      SlideShowWindows(1).View.GotoSlide (lSlideIndex)
  End Sub
  Sub ONEA()
      Right
      JumpTo 6
  End Sub
  </code></pre>
  
  <p>I had an idea of creating a macro that jumped to a slide number according to the name of the shape, but don't know whether it is possible or not.</p>
  
  <p>Example: option B jumps to slide 60
  the shape name would be 60
  the vba will match the shape name and jumps to slide 60</p>
  
  <p>Any help/ideas for this is appreciated!</p>
  
  <p>Note: my VBA skills is essentially zero.</p>