Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting font properties using function | Excel Programming | |||
how to change font size of datalabels of two charts in a sheet | Excel Programming | |||
how to change font size of datalabels of two charts in a sheet | Charts and Charting in Excel | |||
Geeting error while setting datalabels through VBA | Excel Programming | |||
Setting Font properties in Code clears Undo list | Excel Programming |