title: Setting an Active Cell Value to a variable in VBA
body: <p>I am trying to run a macro that will open a workbook, complete a series of procedures on it, save it, Close it.  Then in the Macro workbook it will move down one row and use that cells value as the filename to open the next workbook.</p>
  
  <p>The issue I am having is how do I get VBA to store a cells value as a variable:</p>
  
  <p>The basics of the macro would look like this:</p>
  
  <pre><code>Dim Num as Long
  Num = ActiveSheet.UsedRange.Rows.Count
  
  Dim Name as String
  Name = ?
  
  Workbooks.Open Filename:="N:\PricingAudit\FY16 Price Increase\Raw DBF Files\TreatmentFiles\" + Name
  
  ...
  ...
  
  Workbooks(Name).Close
  ...
  </code></pre>
  
  <p>Any help would be greatly. Appreciated in this: </p>
  
  <p>Thanks in advance</p>