I have a workbook with 14 worksheets in it, and I need to clear contents with the same range in each worksheet. Here is the code that I'm trying to use:
The code only works on the active sheet...I can't get it to go to the next sheet.
Any ideas would be greatly appreciated.
Thanks in advance,
Jeff
Dim Sht As Worksheet
On Error Resume Next
For Each Sht In ThisWorkbook.Worksheets
Range("C22:H1461").Select
Selection.ClearContents
Range("C22").Select
Next Sht
End Sub
On Error Resume Next
For Each Sht In ThisWorkbook.Worksheets
Range("C22:H1461").Select
Selection.ClearContents
Range("C22").Select
Next Sht
End Sub
The code only works on the active sheet...I can't get it to go to the next sheet.
Any ideas would be greatly appreciated.
Thanks in advance,
Jeff