I don't have tinme to work on this any more. I will advise if you need
additional help. I got the first chart to work with all series colections.
Here are some tricks
1) You can't write the name of the series collection unless there is data in
the chart.
2) You also have to set the series collection to write the name. Not sure
why.
3) You can't add the first series collection. You must set it as part of
the source name. I made the souce name contain two column where you had only
one.
You should be able to turn this code into a loop so it will work with all
200 charts. I have these same problems evvery time I try to automate my
charts. I always takes me hours to get right.
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 7/23/2007 by Tudor
'
' Keyboard Shortcut: Ctrl+u
'
Worksheets("Sheet1").Activate
myseriesname = Worksheets("Sheet1").Cells(1, "B")
Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData _
Source:=Sheets("Sheet1").Range("B110:C145"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(2).XValues = _
"='Japan LongShort Index'!R3C2:R92C2"
ActiveChart.SeriesCollection(2).Values = "=Sheet1!R110C2:R145C2"
Set MySeries = ActiveChart.SeriesCollection(2)
MySeries.Name = myseriesname
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(3).XValues = _
"='Japan LongShort Index'!R3C2:R92C2"
ActiveChart.SeriesCollection(3).Values = _
"='Japan LongShort Index'!R3C3:R92C3"
Set MySeries = ActiveChart.SeriesCollection(3)
MySeries.Name = "Japan L/S Index"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet2"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "788 Japan Ltd"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = _
"Monthly Return"
End With
ActiveSheet.Shapes("Chart 1").IncrementLeft -117#
ActiveSheet.Shapes("Chart 1").IncrementTop -93#
'did not get working yet
'---------------------------------------------------------------------------------------------------
ActiveWindow.Visible = False
Windows("Performance data.xls").Activate
Range("C20").Select
Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData _
Source:=Sheets("Sheet1").Range("C110:C145"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).XValues = _
"='Japan LongShort Index '!R3C2:R92C2"
ActiveChart.SeriesCollection(1).Values = "=Sheet1!R110C3:R145C3"
ActiveChart.SeriesCollection(1).Name = "=Sheet1!R1C3"
ActiveChart.SeriesCollection(2).XValues = _
"='Japan LongShort Index'!R3C2:R92C2"
ActiveChart.SeriesCollection(2).Values = _
"='Japan LongShort Index'!R3C3: R92C3 "
ActiveChart.SeriesCollection(2).Name = "=""Japan L/S Index"""
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet2"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "A.I. Equity Hedge Fund"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = _
"Monthly Return"
End With
End Sub