Run-time error-2147467259 (80004005) when you set a property of a chart
Symptoms
Consider the following scenario:
- You have a macro that sets a property of a chart in Microsoft Excel. For example, the macro sets the MaximumScale, MinimumScale, Title, Axis, or Legendproperty 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.
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για