Chart formatting VBA
I don't want to save as a chart template but instead want to assign a macro to something that once a chart is highlighted, will remove the border line and set a shadow.
I've recorded the macro and the VBA reads as below, but obviously references 'Chart 1'. Could you advise how I can amend the macro so that it refers to the chart that I've clicked in to focus please?
ie, click to focus on a chart and then I run the macro?
Thanks
Sub Prep_Chart()
'
' Prep_Chart Macro
'
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.Shapes("Chart 1").Line.Visible = msoFalse
ActiveSheet.Shapes("Chart 1").Shadow.Type = msoShadow21
End Sub
|