R
Ronald Dodge
At times, the program uses the Values property without erroring out, but
doesn't actually set the Values property on the series, and other times, it
errors out. See the snippet below.
With .SeriesCollection()
If .Count > 2 Then
For I = .Count To 3 Step -1
.Item(I).Delete
Next I
End If
For I = 1 To 2 Step 1
With .Item(I)
.Values =
Workbooks("0271321_Production-2.xls").Worksheets("Charts").Range("C55:J55")
'This is the line that isn't working properly.
.Name =
Workbooks("0271321_Production-2.xls").Worksheets("Charts").Range("$B$55")
'This line isn't working peroperly either.
.ChartType = xlArea
With .Border
.Weight = xlThin
.LineStyle = xlNone
End With
.Shadow = False
With .Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
End With 'Series 2
Next I
End With 'Series Collection
The macro recorder showed the Values property as having a string value,
which it always errors out on me with that and the help files shows it
should be either a range object or a values collection, but not both. Not
only that, but the macro recorder used the R1C1 reference format rather than
the normal default A1 reference format for it's string reference format.
I would hate to have to do this manually for 3 different charts on each
machine file and on a total of 15 different machine files.
doesn't actually set the Values property on the series, and other times, it
errors out. See the snippet below.
With .SeriesCollection()
If .Count > 2 Then
For I = .Count To 3 Step -1
.Item(I).Delete
Next I
End If
For I = 1 To 2 Step 1
With .Item(I)
.Values =
Workbooks("0271321_Production-2.xls").Worksheets("Charts").Range("C55:J55")
'This is the line that isn't working properly.
.Name =
Workbooks("0271321_Production-2.xls").Worksheets("Charts").Range("$B$55")
'This line isn't working peroperly either.
.ChartType = xlArea
With .Border
.Weight = xlThin
.LineStyle = xlNone
End With
.Shadow = False
With .Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
End With 'Series 2
Next I
End With 'Series Collection
The macro recorder showed the Values property as having a string value,
which it always errors out on me with that and the help files shows it
should be either a range object or a values collection, but not both. Not
only that, but the macro recorder used the R1C1 reference format rather than
the normal default A1 reference format for it's string reference format.
I would hate to have to do this manually for 3 different charts on each
machine file and on a total of 15 different machine files.