title: Excel Macro: Beginner - Pasting Formats from one Workbook to Another
body: <p>I dont know Excel Macros so I'm sure this is a ridiculous question.  I have an excel workbook here with 7 worksheets (K:\Common\HSRE\Hospice Payment Reform\Plotzke\Ad Hoc Tasks\OY1\Monitoring for MACs\Results\Results_2012 - Template – Master.xlsx)</p>
  
  <p>I want to copy the formatting from each of those worksheets (the formats are different on each worksheet) to this workbook (K:\Common\HSRE\Hospice Payment Reform\Plotzke\Ad Hoc Tasks\OY1\Monitoring for MACs\Results\Results_2012 – Template.xlsx).  The worksheet names in this workbook are identical to the names in the first workbook.</p>
  
  <p>Based on what I saw online I thought I could do something like (at least for the first worksheet)</p>
  
  <pre><code>Sub FormatMAC()
  
  Workbooks("K:\Common\HSRE\Hospice Payment Reform\Plotzke\Ad Hoc Tasks\OY1\Monitoring for MACs\Results\Results_2012 - Template - Master.xlsx").Worksheets("Provider Level").Range("A1:CZ600").Copy
  
  Workbooks("K:\Common\HSRE\Hospice Payment Reform\Plotzke\Ad Hoc Tasks\OY1\Monitoring for MACs\Results\Copy of Results_2012 - Template1.xlsx").Worksheets("Provider Level").Range("A1:CZ600").PasteSpecial (xlPasteFormats)
  
  End Sub
  </code></pre>
  
  <p>It seems like the program is getting hung up on the first line.  I keep getting this error</p>
  
  <p>Run-time error `9’: Subscript out of Range</p>
  
  <p>Any ideas?</p>