How to Fix Excel Chart Export to JPG or PNG Error 80004005 in Version 2408
Question details
Users are encountering a Run-time error 80004005 when trying to export Excel charts to image formats (JPG/PNG) using VBA macros after a recent software update.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Executing a previously functioning VBA macro to export a chart as a picture file after updating Microsoft 365 to Version 2408.
- Observed behavior
- The VBA script halts at the Chart.Export method and displays Run-time error 80004005, completely failing to generate the JPG or PNG file.
Verify your current Microsoft 365 version by going to File > Account in Excel, and double-check your VBA script for any recent accidental keystrokes.
Roll Back Microsoft Office to Version 2407
Reverting to the previous stable build resolves the bug introduced in the Version 2408 update.
Since Version 2408 contains a known compatibility issue with the VBA Chart.Export method, temporarily downgrading to Version 2407 (Build 17830.20166) is the most reliable workaround until Microsoft releases an official patch.
Note: You may need administrator privileges to perform this action. If your organization restricts rollbacks, you will need to wait for a system-wide update.
Open Excel, navigate to File > Account. Click on 'Update Options' and select 'Disable Updates' to prevent Excel from automatically reinstalling Version 2408.
Click the Windows Start menu, type 'cmd', right-click on 'Command Prompt', and select 'Run as administrator'.
Type the following command exactly and press Enter: "%programfiles%\Common Files\microsoft shared\ClickToRun\officec2rclient.exe" /update user updatetoversion=16.0.17830.20166

Verify and Correct VBA Export Syntax
Ensure the VBA syntax is strictly correct, as minor typographical errors can also trigger export failures.
Switch to WPS Office for Stable Document Management
Avoid unexpected update bugs and VBA runtime errors by using WPS Office. It provides a highly compatible, lightweight, and completely free alternative to Microsoft 365, offering robust spreadsheet capabilities without the hassle of forced buggy updates.
- 1. Download WPS Office: Visit the official WPS Office website and click the 'Download WPS Office Free' button.
- 2. Install the Application: Run the downloaded installation file and follow the quick on-screen prompts to set up the software.
- 3. Open Your Excel Files: Launch WPS Spreadsheets and open your existing .xlsx files directly to continue working seamlessly.

Frequently Asked Questions
Why did my VBA chart export suddenly stop working in Excel?
If your macro worked fine previously, the issue is likely a known bug introduced in Microsoft 365 Version 2408 that breaks the Chart.Export function. Rolling back to Version 2407 generally resolves this.
Can I export an Excel chart to JPG without using a VBA macro?
Yes. You can manually export any chart by right-clicking the outer border of the chart, selecting 'Save as Picture', and choosing JPG or PNG from the file format dropdown list.
What if my organization prevents me from rolling back Office updates?
If you lack administrator rights or are restricted by IT security policies, you will need to wait for Microsoft to release an official patch. In the meantime, use manual export methods or temporarily use alternative software like WPS Office if permitted.




