Method Range of Object Failed, Excel 2000 & 2003
Hello Each Responder,
Vergel Adriano, Jim Thomlinson, Jim Cone, and Tom Ogilvy:
Thank you for your help each response was helpful so that I was able
to use your ideas to get this macro code working:
Sub WorkSheetPageSetup()
'Setup WorkSheet PAGE for Zones
'1. Fill RowB with color Light Grey - value 001 ColumnB
'2. or Fill RowD with color Light Grey - value Left("BLDG")
ColumnD
Dim LastRow As Long
Dim i As Integer
Application.ScreenUpdating = False
For i = 5 To Worksheets.Count
Worksheets(i).Select
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For Each cell In Range("A4:A" & LastRow)
If cell.Offset(, 1).Text = "001" Or Left(cell.Offset(, 3).Text,
4) = "BLDG" Then
Range(cell, cell.Offset(, 6)).Interior.ColorIndex = 15
End If
Next cell
Next i
Worksheets(5).Select
Application.ScreenUpdating = True
End Sub
Thank you for yor help,
jfcby
|