The information in this article applies to:
SYMPTOMSWhen you run a Microsoft Visual Basic for Applications macro, you receive the following error message:
CAUSEThis error message occurs when you attempt to use the Delete method of the SeriesCollection object to delete a data series from a PivotChart. WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools used to
create and debug procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspThe method that you use to remove a data series from being displayed on a PivotChart depends on the layout of the PivotChart. If your PivotChart contains more than one data series, then you must hide, rather than remove, the data series that you do not want displayed on the PivotChart. To do this, set the Visible property of the PivotItem object that you want to hide to False. The following line of code illustrates how to do this:
If your PivotChart contains only one data series, then set the Orientation property of the PivotField object that you want to hide to xlHidden. The following line of code illustrates how to do this:
NOTE: The PivotChart and the related PivotTable report will be empty after Excel executes this line of code.The following sample code illustrates how to detect whether or not the current chart is a PivotChart.
Additional query words: XL2000
Keywords : kbdta kbdtacode kbchart xlvbahowto xlpivot |
Last Reviewed: August 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |