troubleshooting Question

Running Excel macro in an XLS file to export to PDF says "The object invoked has disconnected from its clients" on one computer

Avatar of realtimer
realtimer asked on
PDFMicrosoft ExcelMicrosoft Office
5 Comments1 Solution25 ViewsLast Modified:
We have an XLS file (not xlsm) saved in a network location with a button connected to a macro that exports the contents of a worksheet to a PDF file. It works on PC1 for user1 but it shows the error in the summary on PC2 for user2. When user1 logs into PC2, the export works. User2 has modify permission to the target network location and can create new folders and files. User2 can also manually export to PDF. Both PC's are Windows 10 Professional and have the same version of Office.

Below is the snippet from the macro code and debug highlights the "ActiveSheet.ExportAsFixedFormat" line when it fails.

  ActiveWorkbook.Save
    Sheets("Summary").Select
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "T:\folder\path\export.pdf" _
    , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=True
    Sheets("Summary").Select

On PC2, Microsoft Edge was the default application for PDF files so I changed it to AdobeReader but it did not address the issue.
What could be causing this? Any idea would be greatly appreciated.
ASKER CERTIFIED SOLUTION
realtimer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros