Microsoft KB Archive/928612

= A new series is not added to a chart when you use the SeriesCollection object in a VBA macro in Excel 2007 =

Article ID: 928612

Article Last Modified on 10/15/2007

-

APPLIES TO


 * Microsoft Office Excel 2007

-



SYMPTOMS
When you use the SeriesCollection object in a Microsoft Visual Basic for Applications (VBA) macro to add a new series to a chart in Microsoft Office Excel 2007, the new series is not added.



CAUSE
This issue may occur when the Add method follows the Delete method in the VBA macro.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

To work around this issue, use one of the following methods:  Remove the Delete method from the VBA macro.  Add the Wait method in the VBA code after the Delete method. The following VBA code is an example of the Wait method. Application.Wait Now + TimeValue(&quot;0:00:01&quot;) 



MORE INFORMATION
For more information about the SeriesCollection object, either click Microsoft Visual Basic Help or press F1 in the Visual Basic Editor, type seriescollection in the Search box, and then click Search to view the Help topics.

Additional query words: excel2007 excel2k7 excel12 xl2007 xl2k7 xl12 seriescollection.add

Keywords: kbtshoot kbmacro kbchart kbprogramming kbautomation kbprb kbvba kbexpertiseinter KB928612

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.