Gruppe
Druck
Problem
Wie kann ich zuerst alle Vorder-, dann alle Rückseiten drucken lassen?
StandardModule: basMain
Sub DblShPrint()
Dim varPB As Variant
Dim iCounter As Integer, iPage As Integer, iSheet As Integer
Dim iRow As Integer, iRowL As Integer
Application.ScreenUpdating = False
iRowL = Cells.Find("*", Range("a1"), , , xlByRows, xlPrevious).Row
iSheet = 1
iRow = 1
For iPage = 1 To 2
For iCounter = 1 To ExecuteExcel4Macro("GET.DOCUMENT(50)")
varPB = ExecuteExcel4Macro("INDEX(GET.DOCUMENT(64)," _
& iSheet & ")")
If IsError(varPB) Then varPB = iRowL + 1
If iPage = 1 And iSheet Mod 2 <> 0 Or _
iPage = 2 And iSheet Mod 2 = 0 Then
Range(Cells(iRow, 1), Cells(varPB - 1, 5)) _
.PrintPreview
End If
iSheet = iSheet + 1
iRow = varPB
Next iCounter
iSheet = 1
iRow = 1
If iPage = 1 Then MsgBox "Bitte Blätter einlegen!"
Next iPage
End Sub