make macros in charts

  • Thread starter Thread starter jana
  • Start date Start date
J

jana

can someone tell me how to make a macro that will work in a chart,
specifically how to format a chart to format the chart and plot areas, and
properties (do not move/size with chart). I tried to create the macro, but
I get errors.
thanks!
 
Hi,

It would help if you explained what the errors where and also shown your
code.

This code will set Don't Move and size property of chartobject as well as
set plotarea to automatic border and fill.
'--------------------------
Sub Macro1()
'
With ActiveSheet.ChartObjects(1)
' don't move and size chart object
.Placement = xlFreeFloating
With .Chart
With .PlotArea
.Border.LineStyle = xlAutomatic
.Interior.ColorIndex = xlAutomatic
End With
End With
End With

End Sub
'----------------------

Cheers
Andy
 
Back
Top