![]() |
Loop thru woorksheets
I need to loop thru each worksheet in a workbook and clear the contents
except for the header row. Can anyone suggest a good way to do this in VBA? Thank You |
Loop thru woorksheets
option explicit
sub testme() dim wks as worksheet for each wks in activeworkbook.worksheets with wks .range("2:" & .rows.count).clearcontents end with next wks end sub Striker wrote: I need to loop thru each worksheet in a workbook and clear the contents except for the header row. Can anyone suggest a good way to do this in VBA? Thank You -- Dave Peterson |
All times are GMT +1. The time now is 04:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com