Morning everyone,
A few members helped me on Friday with a problem but I'm still struggling to get this piece of code to work. Can anyone spot what's wrong with this......
It's only copying the contents of one sheet but there are four there?
---------------------------------------------------------------------------------
Private Sub PrintHC_Click()
Dim i As Long
i = Worksheets("Printout").Cells(Rows.Count, 1).End(xlUp).Row + 1
Worksheets("Printout").Select
For Each sh In Worksheets
If sh.Name <> "Begin" And sh.Name <> "Index" And sh.Name <> "Codes" And sh.Name <> "Printout" Then
sh.Range("A2:M12").Copy Worksheets("Printout").Range("A" & i)
End If
Next sh
End Sub
--------------------------------------------------------------------------------
Thanks
Jose
A few members helped me on Friday with a problem but I'm still struggling to get this piece of code to work. Can anyone spot what's wrong with this......
It's only copying the contents of one sheet but there are four there?
---------------------------------------------------------------------------------
Private Sub PrintHC_Click()
Dim i As Long
i = Worksheets("Printout").Cells(Rows.Count, 1).End(xlUp).Row + 1
Worksheets("Printout").Select
For Each sh In Worksheets
If sh.Name <> "Begin" And sh.Name <> "Index" And sh.Name <> "Codes" And sh.Name <> "Printout" Then
sh.Range("A2:M12").Copy Worksheets("Printout").Range("A" & i)
End If
Next sh
End Sub
--------------------------------------------------------------------------------
Thanks
Jose