- 清空单一工作表
Sub ClearContents ()
Application.Calculation = XlManual
Application.ScreenUpdating = False
Sheets("worksheet_name").Cells.ClearContents
Application.ScreenUpdating = True
End Sub
- 清空所有工作表
Sub clear_all_worksheets()
Dim ws as worksheet
For each ws in ThisWorkbook.Worksheets
ws.Cells.ClearContents
Next
End Sub
网友评论