title: Using a Variable to Dim a Worksheet
body: <p>I have a sheet with one cell that is = the name of a folder that I want to dim as a variable. what I want to do is set that cell = the filename variable.  It will probably be easier to look at my code. I am currently getting the "object required error on my "set Input 1" and my way to set the variable is presumably wrong as well</p>
  
  <pre><code>Dim WbkA As Workbook
  Dim Input1 as string
  
  Set Input1 = Workbooks.Open(Filename:="G:\Reporting\ReportCompare.xls").worksheets("Sheet4").Range("A4").Value
  Set wbkA = Workbooks.Open(FileName:"Input1")
  </code></pre>