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:
00576375
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
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
Next
Reply
Map
View

Click here to load this message in the networking platform