View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Select All Sheets and clear Interior Cell colours

Sub clear_color()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Cells.Interior.ColorIndex = xlNone
Next n
Application.ScreenUpdating = True
End Sub


Gord Dibben Excel MVP

On Mon, 21 Mar 2005 14:16:45 -0800, "ExcelMonkey"
wrote:

How do you select all sheets in VBA to clear interior
colours. When I record it looks like this. However I
want to avoid using sheet names like this.


Sheets(Array
("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5","Sheet6"
, "Sheet7", "Sheet8", "Sheet9")). Select
Sheets("Audit Results").Activate
Cells.Select
Selection.Interior.ColorIndex = xlNone