title: Excel VBA to Export Selected Sheets to PDF
body: <p>I'm using the following code to export selected sheets from Excel 2010 to a single pdf file...</p>
  
  <pre><code>ThisWorkbook.Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
  
  ActiveSheet.ExportAsFixedFormat _
          Type:=xlTypePDF, _
          Filename:="C:\temp.pdf", _
          Quality:=xlQualityStandard, _
          IncludeDocProperties:=True, _
          IgnorePrintAreas:=False, _
          OpenAfterPublish:=True
  </code></pre>
  
  <p>My problem is that it only exports the first sheet.  Any ideas?</p>