Excel macro - Clear contents

Post Reply
wwj
Posts: 2497
Joined: 27 Jan 2007 08:16

Excel macro - Clear contents

Post by wwj »

Code: Select all


    ' Clear all contents
    Sheets(outSht).Select
    Sheets(outSht).Activate
    
    lastRow = Sheets(outSht).Cells(Rows.Count, "A").End(xlUp).Row
    ActiveSheet.Range("A2:L" & lastRow).ClearContents  ' Keep its format.


Post Reply