ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 03 to Excel 07 (https://www.excelbanter.com/excel-programming/430902-excel-03-excel-07-a.html)

markus

Excel 03 to Excel 07
 
I am moving from Excel 03 to Excel 07 in Office 07. I have code that
automates the creation of excel charts, and one line is coughing up an error.

This line is where I am selecting a seriescollection to set datalabels.
e.g., ActiveChart.SeriesCollection(1).DataLabels.Select( )
The error indicates the object is not defined.

This is code that has run for years in the older version of Excel, so I have
to think the syntax for setting labels must have changed.

Anyone know of a solution, and anyone know of reference that can help me
make this transition, i.e., somewhere that documents VBA syntax changes?

Many thanks for any ideas on this,
Mark



Jacob Skaria

Excel 03 to Excel 07
 

Try

Activesheet.chartobjects(1).select
'OR
'Activesheet.chartobjects("<charname').select
If ActiveChart.SeriesCollection(1).HasDataLabels = True Then
ActiveChart.SeriesCollection(1).DataLabels.Select
End If

If this post helps click Yes
---------------
Jacob Skaria


"Markus" wrote:

I am moving from Excel 03 to Excel 07 in Office 07. I have code that
automates the creation of excel charts, and one line is coughing up an error.

This line is where I am selecting a seriescollection to set datalabels.
e.g., ActiveChart.SeriesCollection(1).DataLabels.Select( )
The error indicates the object is not defined.

This is code that has run for years in the older version of Excel, so I have
to think the syntax for setting labels must have changed.

Anyone know of a solution, and anyone know of reference that can help me
make this transition, i.e., somewhere that documents VBA syntax changes?

Many thanks for any ideas on this,
Mark




All times are GMT +1. The time now is 01:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com