ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   legendentries (https://www.excelbanter.com/excel-programming/320972-legendentries.html)

ojv[_2_]

legendentries
 
The following code applied to an embedded chart in a chartsheet fails with
error message 'Unable to get the Legendentries property of the Legendclass'.
Error # 1004.

For Each le In ActiveChart.Legend.LegendEntries
le.LegendKey.Border.LineStyle = xlNone
Next

Any idea why?

ojv



Peter T

legendentries
 
Are you sure your chart has a legend,

If ActiveChart.HasLegend Then

Regards,
Peter T

The following code applied to an embedded chart in a chartsheet fails with
error message 'Unable to get the Legendentries property of the

Legendclass'.
Error # 1004.

For Each le In ActiveChart.Legend.LegendEntries
le.LegendKey.Border.LineStyle = xlNone
Next

Any idea why?




Tom Ogilvy

legendentries
 
It worked fine for me. What type of chart are you working with?

--
Regards,
Tom Ogilvy



"ojv" wrote in message
...
The following code applied to an embedded chart in a chartsheet fails with
error message 'Unable to get the Legendentries property of the

Legendclass'.
Error # 1004.

For Each le In ActiveChart.Legend.LegendEntries
le.LegendKey.Border.LineStyle = xlNone
Next

Any idea why?

ojv





ojv[_2_]

legendentries
 
I'm trying it on a surface contour chart.

"Tom Ogilvy" wrote:

It worked fine for me. What type of chart are you working with?

--
Regards,
Tom Ogilvy



"ojv" wrote in message
...
The following code applied to an embedded chart in a chartsheet fails with
error message 'Unable to get the Legendentries property of the

Legendclass'.
Error # 1004.

For Each le In ActiveChart.Legend.LegendEntries
le.LegendKey.Border.LineStyle = xlNone
Next

Any idea why?

ojv






Rob van Gelder[_4_]

legendentries
 
The Legend box needs to showing.

ActiveChart.HasLegend = True

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"ojv" wrote in message
...
I'm trying it on a surface contour chart.

"Tom Ogilvy" wrote:

It worked fine for me. What type of chart are you working with?

--
Regards,
Tom Ogilvy



"ojv" wrote in message
...
The following code applied to an embedded chart in a chartsheet fails
with
error message 'Unable to get the Legendentries property of the

Legendclass'.
Error # 1004.

For Each le In ActiveChart.Legend.LegendEntries
le.LegendKey.Border.LineStyle = xlNone
Next

Any idea why?

ojv









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

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