Excel VBA error 480 occurs when your code attempts to create an AutoRedraw image (like a shape or chart) but fails, often due to incompatible object references, missing dependencies, or misconfigured settings. Yes, you can fix it by checking object references, disabling AutoRedraw temporarily, or updating related add-ins. This guide walks you through exact steps, common causes, and troubleshooting—without guessing or reinventing workarounds.

What You'll Need

  1. Your Excel workbook (or test file if you’ve isolated the issue)
  2. Adobe Acrobat Reader (if you need to inspect PDFs related to shapes/objects)
  3. A temporary backup of your code if you modify it (back up before editing)
  4. Excel’s VBA editor (Alt+F11) or the Developer tab (if enabled)
  5. Admin rights if you need to clear or reinstall Office components

Step-by-Step Fixes

  1. Check Object References:
    1. Open Excel’s VBA editor (Alt+F11).
    2. Go to Tools > References.
    3. Uncheck any references related to AutoShape, Charts, or external add-ins (e.g., "Microsoft ActiveX Data Objects").
    4. If AutoShape is missing, it may be a version mismatch—re-enable it after testing.

    If this doesn’t work, the issue may stem from newer Excel versions requiring explicit object model setup.

  2. Temporarily Disable AutoRedraw in Code:
    1. In your VBA module, replace any calls to: With ActiveChart.AutoRedraw with: ActiveChart.ShowAutoFormat = True (or similar for shapes).
    2. If you’re using AutoShape, set its PictureFormat.AutoRedraw to False.

    This bypasses the error by forcing manual control over redraw behavior.

  3. Verify Add-In Compatibility:
    1. Open Excel and go to File > Options > Add-ins.
    2. Disable third-party add-ins (especially those for charts or shapes).
    3. Restart Excel—if the error persists, the add-in may conflict.
  4. Repair Office Installation:
    1. Close Excel and Windows Explorer.
    2. Run Control Panel > Programs > Microsoft Office Tools > Repair (or use Settings > Apps > Installed Apps > Microsoft 365 on Windows 10).
    3. Restart your PC after completion.

    This ensures Office’s object models are correctly registered.

  5. Update Excel and Dependencies:
    1. Go to Help > Office Account and update Excel.
    2. For older versions (Excel 2016 or earlier), install the latest service pack from Microsoft’s website.
    3. If using Power Query or Power Pivot, ensure these are enabled (Tools > Manage Add-ins).

    AutoRedraw features rely on these integrated components.

If That Did Not Work

  1. Reset Your VBA Environment:
    1. Open VBA editor (Alt+F11).
    2. Go to Tools > Environment Options > General.
    3. Uncheck Enable Visual Basic Editor and restart Excel.
    4. Re-enable it afterward—this resets the editor without losing your code.
  2. Reinstall Office (Last Resort):
    1. Backup your VBA projects and settings.
    2. Uninstall Excel from Control Panel > Programs > Add/Remove Programs.
    3. Reinstall Office from Microsoft’s official website.

    Only do this if you’ve exhausted all other options.

  3. Contact Microsoft Support:
    1. If the error persists after reinstalling Office, the issue may be a bug in your version.
    2. Describe the steps you’ve tried (as outlined above) and provide a screenshot of the error code.

Common Mistakes

  1. Forgetting to Restart Excel: Changes to add-ins or object references often require a restart to take effect. Always verify after making them.
  2. Modifying Code Without Backing Up: If you alter references or disable AutoRedraw manually, test the code in a new workbook first. Errors may not appear until runtime.
  3. Ignoring Version Differences: AutoRedraw behavior changes between Excel 2010 and 2019. Test your code on a clean copy of the target version.
  4. Overlooking Third-Party Add-Ins: Some add-ins (e.g., shape editors or macro packagers) conflict with Excel’s built-in object models.

Tips

  1. Use Debug.Print to Identify the Issue: Insert Debug.Print Err.Description at the start of your code to see the exact error message.
  2. Simplify the Workbook: Open a new Excel file and test your VBA code there. If it fails, the issue is workbook-specific (e.g., merged cells, macros, or conflicting shapes).
  3. Check for Macro Security Warnings: If you get a warning about macros, enable Trust Access to the VBA Project Object Model in Trust Center settings.
  4. Review ActiveX Controls: If you’re using ActiveX shapes, ensure they are enabled in the VBA environment. Go to Tools > References > Microsoft ActiveX Data Objects (if applicable).
  5. Export Objects as Images First: If AutoRedraw is unreliable, export the chart/shape to a PNG/JPG before redrawing. Use: ActiveChart.Export Filename:="C:\temp\chart.png", FilterName:="PNG"

Troubleshooting

  1. Error 480 Appears After Updating Office: Roll back to the previous Office version temporarily. If it works, the update introduced a breaking change.
  2. Shape Objects Are Missing in VBA: Ensure you’re referencing the correct object model: Dim sh As Shape Set sh = ActiveSheet.Shapes.AddShape(msoShapeOval, 100, 100, 50, 50) (Replace msoShapeOval with the correct shape type.)
  3. AutoRedraw Works in Other Workbooks: The issue is workbook-specific. Check for: - Locked cells or objects. - Hidden layers or sheets with conflicting AutoRedraw settings.
  4. Macros Are Disabled in Excel: Go to File > Options > Trust Center > Trust Center Settings > Macro Settings and set to Enable all macros.
  5. Need to Recover Deleted VBA References: If references are missing, open the VBA editor, paste this into a module, and run it: Application.VBE.HJailBreak (Note: This reset can cause issues—do this only as a last resort.)

Frequently Asked Questions

Why does my VBA code fail with "Runtime Error 480" when creating shapes, but not in Excel?

The error occurs because VBA’s object model doesn’t always match Excel’s runtime behavior. This often happens when Office updates change how shapes or charts are handled internally—even if you don’t see errors in Excel itself.

How do I fix "Runtime Error 480" for a specific shape type (e.g., rectangles)?

Replace any AutoShape calls with the correct shape type constant (e.g., msoShapeRectangle). For example: Dim rect As Shape Set rect = ActiveSheet.Shapes.AddShape(msoShapeRectangle, 100, 100, 100, 50)

What if disabling add-ins doesn’t help?

Try reinstalling your version of Excel. If the problem started after an Office update, Microsoft may have introduced a bug in the object model—uninstalling and reinstalling often resolves it.

Can I bypass AutoRedraw entirely in VBA?

Yes. Use ShowAutoFormat = True or disable redraw via the object’s properties (e.g., PictureFormat.AutoRedraw = False). This avoids the error entirely.

Why does this error appear only in certain workbooks?

Workbooks with merged cells, hidden layers, or macros interfering with AutoRedraw can trigger this error. Open a new workbook and test your code there—if it works, the original workbook has a hidden conflict.

What if I’m using Excel Online (Office 365 Web)?

This error is almost impossible to reproduce in Excel Online due to its limited VBA support. Stick to desktop versions for full AutoRedraw functionality.

How do I check which Office version my VBA code is targeting?

Open VBA editor (Alt+F11), press Ctrl+G, and type ThisWorkbook. If the path is C:\Users\...\OneDrive\Documents\Excel..., you’re on a cloud version. For desktop, it’s C:\Program Files\...\Excel....