View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default For Each sheet in WkBook problem

Hi Howard,

another suggestion:

Sub SheetsCopy()
Dim varData As Variant
Dim LRow As Long, i As Long

For i = 65 To 71
With Sheets(Chr(i))
LRow = .Cells(.Rows.Count, 1).End(xlUp).Row
varData = .Range("A2:D" & LRow)
Sheets("Summary").Cells(Rows.Count, 1).End(xlUp)(2) _
.Resize(UBound(varData), UBound(varData, 2)) = varData
End With
Next
End Sub


Regards
Claus B.


Absolutely the way to go with production code; -eliminates the need to
increment the next position! It was my intent, though, to explain the
logic in a step-by-step fashion...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion