title: Export multiple sheets to PDF simultaneously without using ActiveSheet or Select
body: <p>It has been drilled into my head, to avoid bugs and provide a good user experience, it is best to avoid using <code>.Select</code>, <code>.Activate</code>, <code>ActiveSheet</code>,<code>ActiveCell</code>, etc. </p>
  
  <p>Keeping this in mind, is there a way to use the <code>.ExportAsFixedFormat</code> method on a subset of <code>Sheets</code> in a workbook without employing one of the above? So far the only ways I have been able to come up with to do this are to either:</p>
  
  <ol>
  <li>use a <code>For Each</code>; however, this results in separate PDF files, which is no good.</li>
  <li><p>use the code similar to that generated by the macro recorder, which uses <code>.Select</code> and <code>ActiveSheet</code>:</p>
  
  <pre><code>Sheets(Array("Sheet1", "Chart1", "Sheet2", "Chart2")).Select
  ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
      "exported file.pdf", Quality:=xlQualityStandard, _
      IncludeDocProperties:=True, IgnorePrintAreas:=False, openafterpublish:= True
  </code></pre></li>
  </ol>
  
  <p>Perhaps it is impossible not to use <code>ActiveSheet</code>, but can I at least get around using <code>.Select</code> somehow?</p>
  
  <p>I have tried this:</p>
  
  <pre><code>Sheets(Array("Sheet1", "Chart1", "Sheet2","Chart2")).ExportAsFixedFormatType:= _
      xlTypePDF, Filename:= "exported file.pdf", Quality:=xlQualityStandard, _
      IncludeDocProperties:=True, IgnorePrintAreas:=False, openafterpublish:= _
      True
  </code></pre>
  
  <p>This produces:</p>
  
  <blockquote>
    <p>error 438: Object doesn't support this property or method</p>
  </blockquote>