title: Adding a "Home" hyperlink to a shape using VBA
body: <p>this question has been asked before but the solution I found does not seem to work, no matter what I try - Here's my problem:</p>
  
  <p>I have several worksheets in a workbook. I created a macro that creates a button (using a shape) and places a hyperlink on it to the first sheet in the book called "Crawl Summary". The macro then places that button on every other worksheet within the book.</p>
  
  <p>The macro that is recorded is this:</p>
  
  <pre><code>'Creates a navigation button back to Crawl Summary Page on each page
  
      Sheets("Robots.txt Blocked").Select
      Range("A1").Select
       ActiveSheet.Shapes.AddShape(msoShapeRoundedRectangle, 0, 1.2, 52.2, 13.2). _
          Select
      Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "SUMMARY"
      With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 7). _
          ParagraphFormat
          .FirstLineIndent = 0
          .Alignment = msoAlignLeft
      End With
      With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 7).Font
          .NameComplexScript = "+mn-cs"
          .NameFarEast = "+mn-ea"
          .Fill.Visible = msoTrue
          .Fill.ForeColor.ObjectThemeColor = msoThemeColorLight1
          .Fill.ForeColor.TintAndShade = 0
          .Fill.ForeColor.Brightness = 0
          .Fill.Transparency = 0
          .Fill.Solid
          .Size = 11
          .Name = "+mn-lt"
      End With
      Selection.ShapeRange.ScaleWidth 1.9540229885, msoFalse, msoScaleFromTopLeft
      Selection.ShapeRange.ScaleHeight 0.9090909091, msoFalse, msoScaleFromTopLeft
      Selection.ShapeRange.TextFrame2.VerticalAnchor = msoAnchorMiddle
      Selection.ShapeRange.TextFrame2.TextRange.ParagraphFormat.Alignment = _
          msoAlignCenter
      Selection.ShapeRange.TextFrame2.TextRange.Font.Bold = msoTrue
      ActiveSheet.Shapes.Range(Array("Rounded Rectangle 1")).Select
      ActiveSheet.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1), Address:=""
      Selection.Copy
      Sheets("Noindexed Pages").Select
      Range("A1").Select
      ActiveSheet.Paste
  </code></pre>
  
  <p>As you can see, the code ends with the button being copied to the next worksheet called "Noindexed Pages" but the hyperlink for both pages above is not applied.</p>
  
  <p>This is apparently because of the explanation on this Stackoverflow answer:</p>
  
  <p><a href="https://stackoverflow.com/questions/31225024/excel-vba-add-hyperlink-to-shape-to-link-to-another-sheet">Excel VBA add hyperlink to shape to link to another sheet</a></p>
  
  <p>The recommended solution given on this page is as follows:</p>
  
  <pre><code>Sub SetHyperlinkOnShape()
      Dim ws As Worksheet
      Set ws = ThisWorkbook.Sheets("Sheet6")
  
      Dim hyperLinkedShape As Shape
  
      Set hyperLinkedShape = ws.Shapes("Rounded Rectangle 1")
  
      ws.Hyperlinks.Add Anchor:=hyperLinkedShape, Address:="", _
          SubAddress:="Sheet4!C4:C8", ScreenTip:="yadda yadda"
  End Sub
  </code></pre>
  
  <p>But this just doesn't work for me no matter what I try, even if I create</p>
  
  <p>Can anyone advise on what code I need to successfully add an internal hyperlink to "Crawl Summary" on the button (shape) in the active worksheet?</p>