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
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 1Run-time error '-2147467259 (80004005)':
Method 'MaximumScale' of object 'Axis' failed
Error message 2Run-time error '-2147467259 (80004005)':
Automation error
Unspecified error
This problem occurs because the Excel object model for the chart is disabled on a protected worksheet.
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.
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
| 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