ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   make macros in charts (https://www.excelbanter.com/charts-charting-excel/210610-make-macros-charts.html)

jana

make macros in charts
 
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!

Andy Pope

make macros in charts
 
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

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"jana" wrote in message
...
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!




All times are GMT +1. The time now is 07:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com