Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default 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







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"