This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ClearSheet() | |
Dim sheetToClear As Worksheet | |
Set sheetToClear = ActiveSheet ' Replace this with the sheet reference | |
' Delete something specific... | |
' sheetToClear.Cells.ClearFormats | |
' sheetToClear.Cells.ClearContents | |
' sheetToClear.Cells.ClearHyperlinks | |
' ...or every kind of data in the cells | |
sheetToClear.Cells.Clear |