![]() |
setting font and other properties for datalabels
I am having problems with my code that automates Excel 03 when applied to
Excel 07. The problem is in charting. I use the following code (used in many prior versions of Excel) to set the datalabels in an Excel chart that was created successfully: oExcel.ActiveChart.SeriesCollection(1).DataLabels. Select This line works fine in 03, but is coughing up an error €śData Type Mismatch Expecting Object€ť when run in Excel 07 (the chart itself does get constructed successfully in 07). I checked and ActiveChart and SeriesCollection(1) are defined objects, but Datalabels returns as empty and must be causing the error since it cannot be selected. I tried: oExcel.ActiveSheet.ChartObjects("Chart 1").activate oExcel.ActiveChart.SeriesCollection(1).DataLabels. Select Which appears to be how a recorded macro would do it, but still the same error message. Anyone have a solution to this or even any ideas on what I might try. Many thanks for any and all ideas, Mark |
All times are GMT +1. The time now is 12:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com