W
whitethomas12
I am getting an error message when trying to have a macro create a
chart. The following is my error message:
Run-Time Error '1004'
Unbale to set the xValue property of the Seris class
The following is my code:
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet5"
ActiveChart.SetSourceData
Source:=Sheets("Sheet4").Range("A3:A23,C3:C23"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=(Sheet4!A8,A15,A23)"
ActiveChart.SeriesCollection(1).Values = _
"=(Sheet4!C9,C16,C24)"
ActiveChart.SeriesCollection(1).Name = "=Sheet4!A2"
All of my cells is sheet4 have valid data. I am not sure what I am
doing wrong. The should be created in sheet5
chart. The following is my error message:
Run-Time Error '1004'
Unbale to set the xValue property of the Seris class
The following is my code:
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet5"
ActiveChart.SetSourceData
Source:=Sheets("Sheet4").Range("A3:A23,C3:C23"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=(Sheet4!A8,A15,A23)"
ActiveChart.SeriesCollection(1).Values = _
"=(Sheet4!C9,C16,C24)"
ActiveChart.SeriesCollection(1).Name = "=Sheet4!A2"
All of my cells is sheet4 have valid data. I am not sure what I am
doing wrong. The should be created in sheet5