Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Series Object and Values Property
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. -- Ronald R. Dodge, Jr. Production Statistician/Programmer Master MOUS 2000 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Series Object and Values Property
Article 139327 answered the question as to why, which that article was
written to apply to XL97, XL98, but this also apply to XL2002. I am not pleased about this as it means that I have to hardcode the formula to be adjusted to return a blank to show up as a zero as well as set the DisplayBlankAs to xlZero prior to making the changes and then reverse the formula back to the original formula and reset the DisplayBlankAs back to xlInterpolated after making the adjustments to the properties on the Series object, just so as the impacted charts will function properly. -- Ronald R. Dodge, Jr. Production Statistician/Programmer Master MOUS 2000 "Ronald Dodge" wrote in message ... 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. -- Ronald R. Dodge, Jr. Production Statistician/Programmer Master MOUS 2000 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
unable to set the values property of the series class | Excel Discussion (Misc queries) | |||
Unable to set the Values property of the Series class | Charts and Charting in Excel | |||
Is there a property to get the values for a point in a chart series? | Excel Programming | |||
Setting the Values Property of the Series Class | Excel Programming |