Microsoft Knowledge Base Email Alertz

Run-time error '-2147467259 (80004005)' when you programmatically set a property of a chart in Excel 2007 or in Excel 2010

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 983119 - Last Review: August 26, 2011 - Revision: 2.2

"Run-time error '-2147467259 (80004005)'" when you programmatically set a property of a chart in Excel 2007 or in Excel 2010

SYMPTOMS

Consider the following scenario:
  • You have a macro that sets a property of a chart in Microsoft Office Excel 2007 or in Microsoft Excel 2010. For example, the macro sets the MaximumScale, MinimumScale, Title, Axis, or Legend property of a chart.
  • You protect the worksheet. When you do this, you click to select the Edit objects check box in the Protect Sheet dialog box.
  • You run the macro.

In this scenario, you receive an error message that resembles one of the following.

Error message 1
Run-time error '-2147467259 (80004005)':

Method 'MaximumScale' of object 'Axis' failed
Error message 2
Run-time error '-2147467259 (80004005)':

Automation error

Unspecified error

CAUSE

This problem occurs because the Excel object model for the chart is disabled on a protected worksheet.

WORKAROUND

To work around this problem, unprotect the worksheet to enable the macro to run. You can manually unprotect the worksheet or by using the Unprotect method in the macro.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

APPLIES TO
  • Microsoft Excel 2010
  • Microsoft Office Excel 2007
Keywords: 
kbsurveynew kbprb kbexpertiseinter kberrmsg KB983119
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate