copy properties

usul
09-14-2004, 09:20 AM
Hoi,

Is it possible to copy all properties from one chart to another in Excel. Now i copy every property by itself, e.g.

Sub test()
ActiveSheet.ChartObjects("Chart 1").Chart.ChartArea.Border.Weight = _
ActiveSheet.ChartObjects("Chart 2").Chart.ChartArea.Border.Weight

ActiveSheet.ChartObjects("Chart 1").Chart.ChartArea.Border.ColorIndex = _
ActiveSheet.ChartObjects("Chart 2").Chart.ChartArea.Border.ColorIndex

ActiveSheet.ChartObjects("Chart 1").Chart.ChartArea.Border.LineStyle = _
ActiveSheet.ChartObjects("Chart 2").Chart.ChartArea.Border.LineStyle

ActiveSheet.ChartObjects("Chart 1").Chart.ChartArea.Border.Weight = _
ActiveSheet.ChartObjects("Chart 2").Chart.ChartArea.Border.Weight
End Sub

There must be an easier way to do this??

Greetz,
Usul

herilane
09-14-2004, 03:50 PM
Have you tried copy & paste? :)
With ThisWorkbook.Worksheets(1)
.ChartObjects("Chart 1").Chart.ChartArea.Copy
.ChartObjects("Chart 2").Chart.Paste Type:=xlFormats
End With

usul
09-15-2004, 02:08 AM
I did try something like this, but not on the chartarea. Thanks a lot!

mmm if all my questions had such simple answers.......

Usul

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum