Sheets("Sheet1").Cells.ClearContents

  • Thread starter Thread starter Seeker
  • Start date Start date
S

Seeker

I have several worksheets which I would like to clear all contents and thus
it would be ready for data input next time. I tried Clear or ClearContents
but some sheets do not clean up, any idea please ?
 
Try the below macro

Sub Macro()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
sh.Cells.ClearContents
Next
End Sub

If this post helps click Yes
 
Tks Jacob.

Jacob Skaria said:
Try the below macro

Sub Macro()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
sh.Cells.ClearContents
Next
End Sub

If this post helps click Yes
 
Back
Top