title: Excel compile error: Can't assign to read-only property
body: <p>I'm getting an error in Excel regarding assignment to a read-only property with the following code:</p>
  
  <pre><code>1    Sub GetSheets()
  2    Path = "C:WHERE MY DOCUMENTS ARE KEPT"
  3    Filename = Dir(Path &amp; "*.CSV")
  4      Do While Filename &lt;&gt; ""
  5      Workbooks.Open Filename:=Path &amp; Filename, ReadOnly:=True
  6         For Each Sheet In ActiveWorkbook.Sheets
  7         Sheet.Copy After:=ThisWorkbook.Sheets(1)
  8      Next Sheet
  9         Workbooks(Filename).Close
  10         Filename = Dir()
  11      Loop
  12    End Sub
  </code></pre>