title: VBA Hyperlinks between Worksheets
body: <p>I am working in a large workbook with multiple worksheets and I am trying to write a user form that will display all the worksheets that are in the workbook. I already have the code for identifying all the worksheets in the given workbook and this is already in a text field in a user form. The output is something like that:</p>
  <p>.................
  Sheet 1  Page1 <br />
  Sheet 2  Page2 <br />
  Sheet 3  Page3 <br />
  Sheet 4  Page4 <br />
  Sheet 5  Page5 <br />
  Sheet 6  Page6 <br />
  Sheet 7  Page7 <br />
  Sheet 8  Page8 \</p>
  <p>......................</p>
  <p>I want to insert a hyperlink in the string &quot;Page number&quot; so that when I click on the corresponding field, the corresponding worksheet is activated. I basically have no idea how to add a hyperlink to a string value without using a cell as a reference.</p>
  <p>Here is the code I used to extract the corresponding sheet names and their index:</p>
  <pre><code> Sub WorksheetLoop()
  
       Dim WS_Count As Integer
       Dim i As Integer
       Dim txt As Variant
  
       WS_Count = ActiveWorkbook.Worksheets.count
       
       For i = 1 To WS_Count
          vl = ActiveWorkbook.Worksheets(i).name
          If txt = &quot;&quot; Then
              txt = &quot;Sheet &quot; &amp; i &amp; &quot;  &quot; &amp; vl
          Else
              txt = txt &amp; vbCrLf &amp; &quot;Sheet &quot; &amp; i &amp; &quot;  &quot; &amp; vl
          End If
       Next i
       Debug.Print (txt)
    End Sub
  </code></pre>
  <p>Thx a lot for any help</p>