Hi,
I need to loop thtough all worksheets and perfrom formatting. The code i'm using below wont work as it seems to only work in the worksheet is active.
Thanks in advance
Blunder
I need to loop thtough all worksheets and perfrom formatting. The code i'm using below wont work as it seems to only work in the worksheet is active.
Code:
Dim WS_Count As Worksheet
WS_Count = ActiveWorkbook.Worksheets.Count
For i = 2 To WS_Count
ActiveWindow.DisplayGridlines = False
Range("a1:k6").Value = rng.Value
Range("a1, a4:a6,e5, h4, h6").Select
With Selection
.Interior.ColorIndex = 9
.Font.Bold = True
.Font.ColorIndex = 2
End With
Range("b1, b4:b6").Font.Bold = True
Range("a1:b1, a4:c6,e5:f5,h4:k4,h6:k6").Select
With Selection
.Borders(xlEdgeRight).Weight = xlThin
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlInsideVertical).Weight = xlThin
.Borders(xlInsideHorizontal).Weight = xlThin
.Borders(xlEdgeTop).Weight = xlThin
.Borders(xlEdgeBottom).Weight = xlThin
End With
Columns("a:k").AutoFit
Next i
Thanks in advance
Blunder