P
PGalla06
I'm trying to input the text stored in an array into the XValues fiel
in a chart, and I keep encountering the above message. I have no ide
what it means and how to fix the error. Any help someone could provid
is greatly appreciated. Below is the code that I'm using:
ReDim LagArray(NmRows)
Range("A3").Select
For i = 0 To (NmRows - 3)
Set MyRange = Worksheets("LagWorksheet").Range("A" & (3 + i))
LagArray(i) = LTrim(Mid(MyRange, 4, 7))
Next i
'---------------------------------------
Sheets.Add
ActiveSheet.Name = "LagGraph"
Range("A1").Select
Charts.Add
ActiveChart.ChartType = xl3DArea
ActiveChart.SetSourceDat
Source:=Sheets("LagWorksheet").Range("C22"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).XValues = LagArray <- Here's wher
I encounter the problem
ActiveChart.SeriesCollection(1).Values = "=LagWorksheet!R3C5:R"
NmRows & "C5"
ActiveChart.SeriesCollection(1).Name = GroupArray(2)
ActiveChart.SeriesCollection(2).XValues = LagArray
ActiveChart.SeriesCollection(2).Values = "=LagWorksheet!R3C6:R"
NmRows & "C6"
ActiveChart.SeriesCollection(2).Name = GroupArray(1)
ActiveChart.SeriesCollection(3).XValues = LagArray
ActiveChart.SeriesCollection(3).Values = "=LagWorksheet!R3C7:R"
NmRows & "C7"
ActiveChart.SeriesCollection(3).Name = GroupArray(0)
ActiveChart.Location Where:=xlLocationAsObject, Name:="LagGraph
in a chart, and I keep encountering the above message. I have no ide
what it means and how to fix the error. Any help someone could provid
is greatly appreciated. Below is the code that I'm using:
ReDim LagArray(NmRows)
Range("A3").Select
For i = 0 To (NmRows - 3)
Set MyRange = Worksheets("LagWorksheet").Range("A" & (3 + i))
LagArray(i) = LTrim(Mid(MyRange, 4, 7))
Next i
'---------------------------------------
Sheets.Add
ActiveSheet.Name = "LagGraph"
Range("A1").Select
Charts.Add
ActiveChart.ChartType = xl3DArea
ActiveChart.SetSourceDat
Source:=Sheets("LagWorksheet").Range("C22"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).XValues = LagArray <- Here's wher
I encounter the problem
ActiveChart.SeriesCollection(1).Values = "=LagWorksheet!R3C5:R"
NmRows & "C5"
ActiveChart.SeriesCollection(1).Name = GroupArray(2)
ActiveChart.SeriesCollection(2).XValues = LagArray
ActiveChart.SeriesCollection(2).Values = "=LagWorksheet!R3C6:R"
NmRows & "C6"
ActiveChart.SeriesCollection(2).Name = GroupArray(1)
ActiveChart.SeriesCollection(3).XValues = LagArray
ActiveChart.SeriesCollection(3).Values = "=LagWorksheet!R3C7:R"
NmRows & "C7"
ActiveChart.SeriesCollection(3).Name = GroupArray(0)
ActiveChart.Location Where:=xlLocationAsObject, Name:="LagGraph