excel vba way to clear sheet contents code example
Example 1: vba clear a worksheet
Sheet1.UsedRange.ClearContents
Sheet1.UsedRange.ClearFormats
Sheet1.UsedRange.Clear
Sheet1.UsedRange.Delete
With Application
.Calculation = xlManual
.ScreenUpdating = False
Sheet1.UsedRange.Delete
.ScreenUpdating = True
.Calculation = xlAutomatic
End With
Example 2: excel vba quickest way to clear sheet contents
Sheet1.UsedRange.ClearContents
Sheet1.UsedRange.ClearFormats
Sheet1.UsedRange.Clear
Sheet1.UsedRange.Delete
With Application
.Calculation = xlManual
.ScreenUpdating = False
Sheet1.UsedRange.Delete
.ScreenUpdating = True
.Calculation = xlAutomatic
End With