Hallo
Sorry, hat sich ein kleiner Fehler eingeschlichen. Jetzt funktionierte es aber.
Option Explicit
Option Base 1
Sub Zeilen_kopieren()
Dim tabName() As Variant
Dim n As Long, lzQuelle As Long, lzZiel
Dim Anzahl As Long
tabName = Array("Tabelle3", "Tabelle4", "Tabelle5", "Tabelle6", "Tabelle7", "Tabelle8")
Application.ScreenUpdating = False
For n = 1 To UBound(tabName)
lzZiel = Worksheets("Tabelle11").Cells(Rows.Count, "A").End(xlUp).Row
With Worksheets(tabName(n))
lzQuelle = .Cells(.Rows.Count, "A").End(xlUp).Row
Anzahl = lzQuelle - 17 + 1
If Anzahl > 0 Then
.Rows(17).Resize(Anzahl).Copy Worksheets("Tabelle11").Cells(lzZiel + 1, 1)
End If
End With
Next n
Application.ScreenUpdating = True
End Sub
mfg, GHraFri
|