title: Get all Sheet Names of open workbook VBA
body: <p>I have the below macro which lists all the worksheet names in the current(host) workbook.</p>
  <p>I would like to adapt this code so it targets an active/open workbook, which has its workbook name &amp; extension referenced in cell C1.</p>
  <p><code>range(&quot;C1&quot;).value</code></p>
  <p>Please can someone let me know how I adapt the below code.</p>
  <pre><code>Sub ListSheets()
  
      Dim ws As Worksheet
      Dim x As Integer
      
      x = 1
      
      Sheets(&quot;Sheet1&quot;).Range(&quot;A:A&quot;).Clear
      
      For Each ws In Worksheets
          Sheets(&quot;Sheet1&quot;).Cells(x, 1) = ws.Name
          x = x + 1
      Next ws
  
  End Sub
  </code></pre>