title: Error using ExportAsFixedFormat command
body: <p>I am trying to debug some code containing an ExportAsFixedFormat that is causing an "Automation error the object invoked has disconnected from its clients." error message. I am running in 2013 so don't need the PDF/XPS add-in and the function works elsewhere in the workbook. It seems to have something to do with the page I am trying to make the PDF out of. While the main macro is longer, I am having the same error occur when I use this simple piece of code:</p>
  
  <pre><code>Sub NewAssetScreen()
  
      Sheets("New Asset").Select
      Sheets("New Asset").Activate
  
      ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Quality:=xlQualityStandard, _
                                     IgnorePrintAreas:=False, OpenAfterPublish:=True
  
      Sheets("New Asset").Select
      Range("A1").Select
  
  End Sub
  </code></pre>
  
  <p>However if I run the macro with a different worksheet name it works fine. The selection part seems to be ok - ie will work with that worksheet name but it is just the ExportAsFixedFormat command that won't work on the page. </p>
  
  <p>Any insights as to why this might be the case? </p>
  
  <p>Thanks in advance. </p>
  
  <p>Nic</p>