D
dne
Hi all,
I have some code that adds charts to an Excel spreadsheet from an
Access database. All of the code works fine until I try to add custom
labels to an XY Scatter chart.
I have an instance of an excel application, and an instance of a
workbook. I add the chart to the sheet and then reference the chart
through the workbook (the workbook is called objXLbook, and the chart
is objXLbook("sheetname")). When I try to set the DataLabel property of
a Point within the series of the chart using
objXLbook("sheetname").SeriesCollection(1).Points(1).DataLabel.text =
"Whatever value"
I get:
Run-time error '1004'
Unable to get the DataLabel property of the Point class
When I run the same code from within Excel, it works fine.
Any ideas? I can provide the full code if necessary.
Thank in advance
David
I have some code that adds charts to an Excel spreadsheet from an
Access database. All of the code works fine until I try to add custom
labels to an XY Scatter chart.
I have an instance of an excel application, and an instance of a
workbook. I add the chart to the sheet and then reference the chart
through the workbook (the workbook is called objXLbook, and the chart
is objXLbook("sheetname")). When I try to set the DataLabel property of
a Point within the series of the chart using
objXLbook("sheetname").SeriesCollection(1).Points(1).DataLabel.text =
"Whatever value"
I get:
Run-time error '1004'
Unable to get the DataLabel property of the Point class
When I run the same code from within Excel, it works fine.
Any ideas? I can provide the full code if necessary.
Thank in advance
David