title: Adding subroutine to hyperlink not working
body: <p>I'm trying to add a hyperlink to a name which would be linked to a subroutine. When a user clicks on the hyperlinked name, the subroutine would be called.</p>
  
  <p>Right now, I can hyperlink a cell and I have some code that would show a message box but nothing is appearing when I click on the hyperlinked cell.</p>
  
  <p><a href="http://learnexcelmacro.com/wp/2012/04/assign-macro-to-hyperlink/" rel="nofollow noreferrer">"Assign macro to hyperlink" tutorial I'm using</a></p>
  
  <p><strong>Simplified Code:</strong></p>
  
  <pre><code>Sub Main()
      Call SetHyperlink
  End Sub
  
  Sub SetHyperlink()
      Range("A6").Select
      ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="$A$6", TextToDisplay:="TEST"  
  End Sub
  
  Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
      'Check if the Target Address is same as you have given
      'In the above example i have taken A4 Cell, so I am
      'Comparing this with $A$4
  
      If Target.Range.Address = "$A$6" Then
          'Write your all VBA Code, which you want to execute
          'Or Call the function or Macro which you have
          'written or recorded.
          MsgBox "Write your Code here to be executed"
          Exit Sub
      End If
  End Sub
  </code></pre>
  
  <p>I'm still very new to vba so if it's something obvious please let me know the reasoning as well. Thank you in advance!</p>