Wie kann ich in einer Tabelle, die nicht zwingend aktiv ist, den Druckbereich festlegen?
Sowohl bei
With Sheets("ABC")
.PageSetup.PrintArea = .UsedRange
With .PageSetup
.LeftMargin = Application.InchesToPoints(1.10236220472441)
.RightMargin = Application.InchesToPoints(0.748031496062992)
.TopMargin = Application.InchesToPoints(0.708661417322835)
.BottomMargin = Application.InchesToPoints(0.590551181102362)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)
.PrintQuality = 600
.Zoom = 97
.PrintErrors = xlPrintErrorsDisplayed
End With
End With
als auch bei
With Sheets("ABC")
.PageSetup.PrintArea = .Range(.cells(1,1), .cells(35,7))
....
End With
erhalte ich die Fehlermeldung "Die PrintArea-Eigenschaft des PageSetup-Objektes kann nicht festgelegt werden."
Gruss, Peter