title: Is there a way to refresh/update the hyperlink in a shape when the hyperlink is clicked?
body: <p>I have shapes in a diagram that represent processes in a data flow; the shapes are hyperlinked to process definitions located in another tab based on the text in the shape and shape name (e.g. shape named "Control ##" with text "ABC" links to a tab where ABC process is defined).  Is there a way to automatcially update the hyperlink in that shape if I change the text in the shape to be "XYZ" - i.e. I want the hyperlink to then go to the "XYZ" definition?  I tried SheetFollowHyperlink event procedure but nothing seems to happen.  Code i have so far is below:</p>
  
  <pre><code>Sub AssignHyperlink()
  
  Dim CallerShapeName As String
  CallerShapeName = Application.Caller
  
  With ActiveSheet
      Dim CallerShape As Shape
      Set CallerShape = .Shapes(CallerShapeName)
  
      Dim RowVar As Integer
  
      Err.Number = 0
      On Error Resume Next
  
      If InStr(CallerShapeName, "Control") = 1 Then
  
          RowVar = Application.WorksheetFunction _
              .Match(.Range("C2").Value &amp; CallerShape.TextFrame2.TextRange.Text, _
              Sheets("Control Point Log").Range("A1:A700"), 0)
  
          If (Err.Number = 1004) Then
              MsgBox "No match found for this shape text in the Control Point Log"
              Exit Sub
          End If
  
          On Error GoTo 0
  
          .Hyperlinks.Add Anchor:=CallerShape, _
          Address:=ActiveWorkbook.Name &amp; "#" &amp; "'Control Point Log'!$C$" &amp; RowVar
  
      Else
  
          RowVar = Application.WorksheetFunction _
              .Match(.Range("C2").Value &amp; CallerShape.TextFrame2.TextRange.Text, _
              Sheets("Data Flow Glossary").Range("A1:A700"), 0)
  
          If (Err.Number = 1004) Then
              MsgBox "No match found for this shape text in the Data Flow Glossary"
              Exit Sub
          End If
  
          On Error GoTo 0
  
          .Hyperlinks.Add Anchor:=CallerShape, _
          Address:=ActiveWorkbook.Name &amp; "#" &amp; "'Data Flow Glossary'!$C$" &amp; RowVar
  
      End If
  
  End With
  
  End Sub
  </code></pre>