View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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