Ich möchte gerne in der Fußzeile anzeigen lassen Seite 1 von 4 usw.
Problem ist: Es wird immer die selbe Seite gedruckt, ich gebe beim Drucken die Kopien ein.
Geht das ohne Makro?
SG, Heinz
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim Kopien As Long, I As Long
On Error GoTo Fehler
Cancel = True
Do
Kopien = Application.InputBox("Anzahl Kopien", "Drucken", 1, Type:=1)
If Kopien = 0 Then Exit Do
Loop While Kopien < 1
If Kopien > 0 Then
With Application
.PrintCommunication = False
.EnableEvents = False
End With
For I = 1 To Kopien
ActiveSheet.PageSetup.LeftFooter = "Kopie " & I & " von " & Kopien
ActiveSheet.PrintOut
Next
Application.PrintCommunication = True
End If
Err.Clear
Fehler:
Application.EnableEvents = True
If Err.Number <> 0 Then MsgBox "Fehler: " & _
Err.Number & vbLf & Err.Description: Err.Clear
End Sub