Clear contents of cells in VBA using column reference

后端 未结 8 1929
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 22:31

I am trying to get a piece of code to clear the data in some cells, using the column references. I am using the following code:

Worksheets(sheetname).Range(.         


        
8条回答
  •  无人及你
    2021-01-01 23:03

    I just came up with this very simple method of clearing an entire sheet.

    Sub ClearThisSheet()
    
    ActiveSheet.UsedRange.ClearContents
    
    End Sub
    

提交回复
热议问题