Gruppe
Druck
Problem
An den Zeilen mit dem Wert XYZ in Spalte A soll ein Seitenwechsel eingefügt werden.
StandardModule: Modul1
Sub Seitenwechsel()
Dim iRow As Integer
For iRow = WorksheetFunction.CountA(Columns(1)) To 1 Step -1
If Cells(iRow, 1).Value = "XYZ" Then
Tabelle1.HPageBreaks.Add Cells(iRow, 1)
End If
Next iRow
End Sub