![]() |
Change default settings for surface chart legend
I am creating surface charts containing a lot of data and I'm using a colour
scheme imported from another spreadsheet that looks nice and pretty and fades from dark green up through yellows, oranges and reds towards the higher values. It looks great when there are no borders on the legend entries, but this always appears to be the default setting, and with borders on my chart is more black lines than pretty colours. Its a real pain to select each of about 20 legend entries in turn and remove the borders, especially as I am creating lots of charts. Is there a quick way (macro?) of getting rid of the borders, or a way to change the default setting??? |
Change default settings for surface chart legend
With a little help from the macro recorder.
Sub RemoveSurfaceBorders() Dim objLE As LegendEntry Application.ScreenUpdating = False With ActiveChart For Each objLE In ActiveChart.Legend.LegendEntries objLE.LegendKey.Border.LineStyle = xlNone Next End With Application.ScreenUpdating = True End Sub Cheers Andy rmellison wrote: I am creating surface charts containing a lot of data and I'm using a colour scheme imported from another spreadsheet that looks nice and pretty and fades from dark green up through yellows, oranges and reds towards the higher values. It looks great when there are no borders on the legend entries, but this always appears to be the default setting, and with borders on my chart is more black lines than pretty colours. Its a real pain to select each of about 20 legend entries in turn and remove the borders, especially as I am creating lots of charts. Is there a quick way (macro?) of getting rid of the borders, or a way to change the default setting??? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Change default settings for surface chart legend
Thanks again Andy!
"Andy Pope" wrote: With a little help from the macro recorder. Sub RemoveSurfaceBorders() Dim objLE As LegendEntry Application.ScreenUpdating = False With ActiveChart For Each objLE In ActiveChart.Legend.LegendEntries objLE.LegendKey.Border.LineStyle = xlNone Next End With Application.ScreenUpdating = True End Sub Cheers Andy rmellison wrote: I am creating surface charts containing a lot of data and I'm using a colour scheme imported from another spreadsheet that looks nice and pretty and fades from dark green up through yellows, oranges and reds towards the higher values. It looks great when there are no borders on the legend entries, but this always appears to be the default setting, and with borders on my chart is more black lines than pretty colours. Its a real pain to select each of about 20 legend entries in turn and remove the borders, especially as I am creating lots of charts. Is there a quick way (macro?) of getting rid of the borders, or a way to change the default setting??? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
All times are GMT +1. The time now is 02:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com