BUG: Cannot Add Chart to Specific Worksheet using Automation to Excel (245089)
The information in this article applies to:
- Microsoft Excel 2000
- Microsoft Excel 97 for Windows
This article was previously published under Q245089 SYMPTOMS
When setting an embedded chart's location to a specific worksheet, the chart is always added to the first worksheet in the workbook and not the sheet that you specify.
CAUSE
This problem occurs when:
- You are automating Microsoft Excel.
- and -
-
- and - You set the chart's location using the Chart object's Location method.
RESOLUTION
To work around this problem, do not use the Location method. Instead, use the Add method to add the embedded chart to the ChartObjects collection.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
This problem was corrected in Microsoft Excel 2002.
REFERENCES219151 HOWTO: Automate Microsoft Excel from Visual Basic
142387 HOWTO: Create Excel Chart w/OLE Automation from Visual Basic
211436 XL2000: Error Appears When Changing Chart Location with a Macro
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbAutomation kbbug kbpending KB245089 |
---|
|