P
(PeteCresswell)
VBA routine pulling the strings in an Excel.WorkSheet object.
The WS in question has several groupings of data on it.
I need to know the last cell in each group.
Row numbers don't do it bc I am assigning subtotals - which push
rows down.
Instead, I am setting the contents of the leftmost cell after the
group to "End: " + (group name).
This works when I have to scan for the end of the group, but
looks hokey to the user.
So I'd like to make that text invisible.
Seems like this should do it:
With theWS.Cells(R + 2), 1)
.Font.ColorIndex = .Interior.ColorIndex
End with
But it's throwing an Error 1004: Unable to set the ColorIndex
property of the Font class".
Tried setting Font.Size=1, but it threw a similar error.
OTOH, I seem tb able to do the .Size thing in an Immediate
window.
Can anybody shed some light? Am I missing some more direct
approach? I don't want to set up a hidden column bc that would
throw off many, many other routines that assume things start in
column 1.
I guess I could wimp out and put the lit out in column 255...
The WS in question has several groupings of data on it.
I need to know the last cell in each group.
Row numbers don't do it bc I am assigning subtotals - which push
rows down.
Instead, I am setting the contents of the leftmost cell after the
group to "End: " + (group name).
This works when I have to scan for the end of the group, but
looks hokey to the user.
So I'd like to make that text invisible.
Seems like this should do it:
With theWS.Cells(R + 2), 1)
.Font.ColorIndex = .Interior.ColorIndex
End with
But it's throwing an Error 1004: Unable to set the ColorIndex
property of the Font class".
Tried setting Font.Size=1, but it threw a similar error.
OTOH, I seem tb able to do the .Size thing in an Immediate
window.
Can anybody shed some light? Am I missing some more direct
approach? I don't want to set up a hidden column bc that would
throw off many, many other routines that assume things start in
column 1.
I guess I could wimp out and put the lit out in column 255...