title: How to assign a worksheet variable using a string
body: <p>I have a table with a list of report data sources, including server name, table, fields, groupby etc...  I can then select the entries I wish to refresh via  Slicer and hit REFFRESH.
  One column has the name of the table where the data should be put, just a basic string.  How can I assign that to a worksheet variable.</p>
  
  <p>I get TYPE MISMATCH when using the following.  x is just part of a loop that checks each row in the table to see if it is selected.</p>
  
  <pre><code>dim oLo As ListObject, cTab As Worksheet
  Set cTab = wb.Sheets(oLo.DataBodyRange.Cells(x, 10))
  </code></pre>
  
  <p>Any ideas?</p>