I have this chart maker that makes bar charts structured with multiple series (upwards of 100) and then colors in the bars based on other criterion.
I'm not going to post the entirety of my code because it's just a snippet that seems not to work.
By not work, it's not that there are bugs, it's just that the desired effect is not achieved.
Onto the issue/snippet:
So the code works for until c=57, at which point it stops executing .ColorIndex = 15 despite F8 going through ok (no bugs). The .Pattern = xlSolid code continues to work for c>57 but .ColorIndex stays the same and does not get changed to 15.
To make matters even more confusing, my conditionals nested with these loops seem to be working just fine.
The largest selections I have to deal with are ~150, so I have already tried breaking up the loop into smaller chunks (c = 1 to 56 and c = 56 to 88) but this doesn't work either.
Code is looking disobedient. Suggestions?
I'm not going to post the entirety of my code because it's just a snippet that seems not to work.
By not work, it's not that there are bugs, it's just that the desired effect is not achieved.
Onto the issue/snippet:
Code:
Dim c as Long, cT as Long
cT = 88
For c = 1 To cT
ActiveChart.SeriesCollection(c).Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
Next
So the code works for until c=57, at which point it stops executing .ColorIndex = 15 despite F8 going through ok (no bugs). The .Pattern = xlSolid code continues to work for c>57 but .ColorIndex stays the same and does not get changed to 15.
To make matters even more confusing, my conditionals nested with these loops seem to be working just fine.
Code:
If Workbooks("StockPickingExercise2012 1H.xls").Sheets("Temp").Cells(c2, 6).Value = "Long" Then
ActiveChart.SeriesCollection(c).Select
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
The largest selections I have to deal with are ~150, so I have already tried breaking up the loop into smaller chunks (c = 1 to 56 and c = 56 to 88) but this doesn't work either.
Code is looking disobedient. Suggestions?