Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete series in Excel graph from Access
Message
General information
Forum:
Microsoft Office
Category:
Access
Miscellaneous
Thread ID:
00576337
Message ID:
00576932
Views:
15
Also check that you are referencing the correct chart object with ActiveChart.Name.

>The KB article says it pertains to pivot charts, which mine isn't. They didn't exist in Excel 97. It does look as if I am seeing the same bug. I have a feeling that Microsoft knows it, but doesn't have a workaround for regular graphs. A series object doesn't have an .Orientation property or a .Visible property. So I don't know how to apply their workaround. Any other thoughts?
>
>Thank you.
>
>>See if this MSKB helps: http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q210735
>>
>>>I am converting/enabling an Access 97 .mdb that has Excel automation code which opens an Excel file, inserts data, and modifies the graph. The code to delete unneeded lines or series is not working in Access 2002, though it did work in Access 97.
>>>
>>>With objGraphSheet.ChartObjects(1).Chart
>>>.SeriesCollection("Task Budgeted Expenditure").Delete
>>>
>>>I get the error "Delete method of Series Class Failed". If I replace that command with
>>>.SeriesCollection("Task Budgeted Expenditure").Select
>>>Selection.Delete
>>>
>>>...the error says "Select method of Series Class Failed".
>>>
>>>I figure that the object reference to the chart is fine because other commands that use it are running fine. I tried putting this code in a macro in the Excel file itself and running it there, in Excel 2002. The macro ran, and correctly deleted the series.
>>>
>>>I also tried putting this command before the line deletion command:
>>>
>>>msgbox("Name = " & .SeriesCollection("Task Budgeted Expenditure").Name
>>>
>>>It made a messagebox saying "Name = Task Budgeted Expenditure" as it should. So the reference to the series seems fine.
Previous
Reply
Map
View

Click here to load this message in the networking platform