View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Jobe Jobe is offline
external usenet poster
 
Posts: 10
Default Macro to change chart references

I apologize for my incompetence Tom,

This works for SeriesCollection(1) but for some reason stops at
SeriesColection(2).

It appears to me that you are creating a varible "s" and setting it equal to
ActiveSheet.Name.

I do not know what the "'" & are for.

Would you please explain.

This is what I have know.

Please excuse my ignorance.

s = "'" & ActiveSheet.Name
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).XValues = "=" & s & "'!R20C1:R54C1"
ActiveChart.SeriesCollection(1).Values = "=" & s & "'!R20C7:R54C7"
ActiveChart.SeriesCollection(2).XValues = "=" & s & "!R20C1:R54C1"
ActiveChart.SeriesCollection(2).Values = "=" & s & "!R20C5:R54C5"
ActiveChart.SeriesCollection(3).XValues = "=" & s & "!R20C1:R54C1"
ActiveChart.SeriesCollection(3).Values = "=" & s & "!R20C6:R54C6"