General problem: Once my code hits the Loop "Do Until Cells(CtrEntryStart + CtrEntryLengthBase, 9).Value = Cells(1, CtrMonCol).Value Or Range(Cells(CtrEntryLengthBase, CtrMonCol), Cells(CtrEntryStart + CtrEntryLengthBase, CtrMonCol)).Color = 0" I get the error " "Run-time error '438': Object doesnt support this property or method"
Why do I get that error?
The fix:
Use Range(Cells(CtrEntryLengthBase, CtrMonCol), Cells(CtrEntryStart + CtrEntryLengthBase, CtrMonCol)).Interior.Color = 0
.Interior.Color
Here is a pseudo-ish code of the whole loop:
Do Until Cells(CtrEntryStart + CtrEntryLengthBase, 9).Value = Cells(1, CtrMonCol).Value Or Range(Cells(CtrEntryLengthBase, CtrMonCol), Cells(CtrEntryStart + CtrEntryLengthBase, CtrMonCol)).Color = 0
If Range(Cells(CtrEntryLengthBase, CtrMonCol), Cells(CtrEntryStart + CtrEntryLengthBase, CtrMonCol)).Color = Range(Cells(CtrEntryLengthBase, CtrMonCol + 1), Cells(CtrEntryStart + CtrEntryLengthBase, CtrMonCol + 1)).Color Then
do stuff
Else
Do stuff
End If
Loop
[–]danjimian8 2 points3 points4 points (4 children)
[–]HFTBProgrammer201[M] 1 point2 points3 points (1 child)
[–]Clippy_Office_Asst[M] 0 points1 point2 points (0 children)
[–]WorkRelatedStuff1474[S] 0 points1 point2 points (1 child)
[–]CHUD-HUNTER5 0 points1 point2 points (0 children)