title: VBA Hyperlink to tab
body: <p>I'm creating an index page as I have an excel doc with 100+ tabs.</p>
  <p>On the index page I originally had the name of the tab matching the text that would link to it. I used this code:</p>
  <pre><code>Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
      Dim ShtName As String
      ShtName = Target.Name
      Sheets(ShtName).Visible = xlSheetVisible
      Sheets(ShtName).Select
  End Sub
  </code></pre>
  <p>The target tab was originally hidden, this code would unhide it, then take me to it, then I have code on the target tab which hides it again when the tab is deactivated. It was working fine.</p>
  <p>Now I have 2 pages per &quot;heading&quot;, so eg I have the heading &quot;Shop&quot; in A1 (no hyperlink), then I have &quot;Details&quot; in B1 and &quot;Transactions&quot; in C1 each with a hyperlink. The tab name for the hyperlink for in the Details cell is D_Shop and in the Transaction cell its T_Shop. The same process goes on for many lines Eg:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>A</th>
  <th>B</th>
  <th>C</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Shop</td>
  <td>Details</td>
  <td>Transactions</td>
  </tr>
  <tr>
  <td>Cinema</td>
  <td>Details</td>
  <td>Transactions</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>So now I can't use <code>Target.Name</code> as it tries to link to &quot;Details&quot; or &quot;Transactions&quot; and I tried <code>Target.Address</code> but it returns a blank string. Any ideas?</p>