Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,074
- Office Version
- 2019
- Platform
- Windows
ok...I'm stump.
I'm trying to loop through each sheet with the following code.
Sheet 1, the last row is 213.
Sheet 2, the last row 7.
The code doesn't seem to recognize the last row for each sheet. How do I get the code to recognize the last row for each sheet.
I'm trying to loop through each sheet with the following code.
Sheet 1, the last row is 213.
Sheet 2, the last row 7.
The code doesn't seem to recognize the last row for each sheet. How do I get the code to recognize the last row for each sheet.
VBA Code:
For Each Ws In Sheets
If Ws.Name <> "Sheet3" Then
With Range("A7:R" & LRow)
.SpecialCells(xlConstants).Font.Color = RGB(242, 242, 242)
.Borders(xlEdgeLeft).Color = RGB(242, 242, 242)
.Borders(xlEdgeRight).Color = RGB(242, 242, 242)
.Borders(xlInsideVertical).Color = RGB(242, 242, 242)
If Not IsLoaded("frmData") Then .Borders(xlEdgeBottom).Color = RGB(242, 242, 242)
End With
If ActiveCell.Row > 6 And Not IsEmpty(ActiveCell) Then
With ActiveCell.Resize(, 18)
.Font.Color = 0
.Borders(xlEdgeLeft).Color = 0
.Borders(xlEdgeRight).Color = 0
.Borders(xlInsideVertical).Color = 0
End With
End If
Rng.SpecialCells(xlConstants).Font.Color = RGB(14, 33, 56)
End If
Next