View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Alternate row coloring

You are correct. I thought I had tested.
Glad Myrna's worked for you.

--
Don Guillett
SalesAid Software

"David Turner" wrote in message
...
Don Guillett wrote

I thought I answered this a day or two ago?

Sub colorvisible()
x = Range("a" & Rows.Count).End(xlUp)
Rows("1:" & x).Interior.ColorIndex = xlNone
For i = 2 To x Step 2
Cells(i, 1).SpecialCells(xlCellTypeVisible) _
.EntireRow.Interior.ColorIndex = 6
Next i
End Sub


Indeed you did. And I replied with the observation that without changing
line 1 to x = Range("a" & Rows.Count).End(xlUp).Row, it bombed with a

'Type
mismatch error. Even with the modification, when called after setting
AutoFilter, my whole sheet turns yellow. Works ok if I don't AutoFilter

any
thing.

--
David