XSCD
01-13-2021, 04:20 AM
The code below is not working to adjust the height and width of the legend of a given chart although the position option is working perfectly. can anyone let me know what could be the case. I am using Microsoft office 365, 16.0 version.
If ActivePresentation.Slides(k).Shapes(Temp_Chart_name).Chart.HasLegend = True Then
With ActivePresentation.Slides(k).Shapes(Temp_Chart_name).Chart
.Legend.Height = 150
.Legend.Width = 450
.Legend.Position = xlLegendPositionBottom
End With
End If
If ActivePresentation.Slides(k).Shapes(Temp_Chart_name).Chart.HasLegend = True Then
With ActivePresentation.Slides(k).Shapes(Temp_Chart_name).Chart
.Legend.Height = 150
.Legend.Width = 450
.Legend.Position = xlLegendPositionBottom
End With
End If