Hello ccpsc,
This version of the macro works. and is faster. In VBA, it is rarely necessary to select an object before performing an action on it. Selecting objects slows the macro down. You also were using a set range which was quite large for each sheet. Excel keeps track of the cells used on worksheet. This can be returned as a single range using the UsedRange property of the worksheet. Since every worksheet has headers in row 1, only the cells below this row need to be cleared.
Sub ClearAll()
Dim Rng As Range
Dim Wks As Worksheet
For Each Wks In Worksheets
Set Rng = Wks.UsedRange.Offset(1, 0)
With Rng
.ClearContents
.Interior.Pattern = xlPatternNone
.Interior.ColorIndex = xlColorIndexNone
End With
Next Wks
End Sub
Bookmarks