Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete series in Excel graph from Access
Message
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00576337
Message ID:
00576923
Vues:
29
This message has been marked as a message which has helped to the initial question of the thread.
Are the data series empty? If so then deleting the points() would have the same effect as deleting the series (if I remember this correctly). So the call would change to: .SeriesCollection("Task Budgeted Expenditure").Points(nIndex).Delete

Also try deleting by referring to the index instead of by 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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform