NatetheGreat
Active Member
- Joined
- Nov 18, 2013
- Messages
- 268
Hi there,
I am very new to VBA. I have written the following code
Sub Series1()
Sheets("Charts").Activate
ActiveSheet.ChartObjects("Chart 3").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets("Raw Data").Range("Y16:Y266")
End Sub
When I had the chart on the raw data sheet, and they were both therefore on the active sheet, it was working fine. I had to move the chart to a different sheet, but am failing to get the Set Source Data Syntax correct to get it to look on the Raw Data sheet for the Chart Series Range.
PLEEAASEEE CAN SOMEONE HELP ! Driving me crazy !!!!
I am very new to VBA. I have written the following code
Sub Series1()
Sheets("Charts").Activate
ActiveSheet.ChartObjects("Chart 3").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets("Raw Data").Range("Y16:Y266")
End Sub
When I had the chart on the raw data sheet, and they were both therefore on the active sheet, it was working fine. I had to move the chart to a different sheet, but am failing to get the Set Source Data Syntax correct to get it to look on the Raw Data sheet for the Chart Series Range.
PLEEAASEEE CAN SOMEONE HELP ! Driving me crazy !!!!