title: How do I reference a Sheet.Column in VBA SQL
body: <p>I created this basic VBA script for the purpose of understanding how to reference a column from a created sheet. In this case, I want to be able to reference the number column of sheet 1 within my sql query. I have attached the complete code I made to test this out. Of course, ws1.number is not working as a field. Is there a correct way to select that column from ws1?  </p>
  
  <p><a href="https://pastebin.com/0FDp48tJ" rel="nofollow noreferrer">code</a></p>
  
  <pre><code>sql = "Select ws1.number " &amp; _
        "from " &amp; ws1 &amp; " as ws1"  
  </code></pre>