16.12.2016, 11:00
Hallo,
Du hast einen Druckbereich festgelegt. Damit ist das Makro teilweise ausgehebelt. Versuch´s mal so:
Du hast einen Druckbereich festgelegt. Damit ist das Makro teilweise ausgehebelt. Versuch´s mal so:
Code:
Sub Drucken_Nummeriert()
Dim wert As String
Dim wert2 As String
Dim m As Long
Dim i As Long
Dim n
Dim anz As Long
Dim loCo As Long
n = InputBox("Bitte die Anzahl der Kopien eingeben! ", "Anzahl Kopien")
If n = vbNullString Then Exit Sub
n = CLng(n)
wert = InputBox("Nummer der Startseite?", "startseite")
If wert = vbNullString Then Exit Sub
wert2 = InputBox("Nummer derletzten zu druckenden Seite", "letzte Seite von " & anz & "Seiten")
If wert2 = vbNullString Then Exit Sub
If wert = "" Then wert = 1
If wert2 = "" Then wert2 = 1
i = CLng(wert)
m = CLng(wert2)
For loCo = i To m
[AR2] = loCo
With Range("A6:A30")
.FormulaLocal = "=($AR$2-1)*25+Zeile()-5"
.Value = .Value
End With
ActiveSheet.PrintOut Copies:=n
Next
End Sub