The following are parts of my code. Could you help me to find the problem?
ActiveSheet.ChartObjects(1).Activate
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy
ActiveWindow.Visible = False
Windows(monthlySum).Activate
Range("A" & (10 * loopP - 5)).Select
ActiveSheet.Paste
ActiveSheet.ChartObjects(loopP).Activate
ActiveChart.SeriesCollection(1).XValues = "='Moving Average'!R" & (loopP * 6 - 1) & "C2:R" & (loopP * 6 - 1) & "C9"
ActiveChart.SeriesCollection(1).Values = "='Moving Average'!R" & (loopP * 6) & "C2:R" & (loopP * 6) & "C9"
ActiveChart.SeriesCollection(1).Name = "='Moving Average'!R" & (loopP * 6) & "C1"
ActiveChart.SeriesCollection(2).XValues = "='Moving Average'!R" & (loopP * 6 - 1) & "C2:R" & (loopP * 6 - 1) & "C9"
ActiveChart.SeriesCollection(2).Values = "='Moving Average'!R" & (loopP * 6 + 1) & "C2:R" & (loopP * 6 + 1) & "C9"
ActiveChart.SeriesCollection(2).Name = "='Moving Average'!R" & (loopP * 6 + 1) & "C1"
Like this thread? Share it with others