PSS ID Number: 193561
Article Last Modified on 10/6/2003
Sub ShadeEveryOtherRow()
Dim Counter As Integer
'For every row in the current selection...
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)...
If Counter Mod 2 = 1 Then
'Set the pattern to xlGray16.
Selection.Rows(Counter).Interior.Pattern = xlGray16
End If
Next
End Sub
Additional query words: XL98
Keywords: kbhowto KB193561
Technology: kbExcel98 kbExcel98Search kbExcelMacsearch kbExcelSearch kbHWMAC kbOSMAC kbVBASearch kbZNotKeyword3 kbZNotKeyword6