Kann mir jemand helfen
Vielen Dank
Hans
Sub druckbereich()
Dim Ws As Worksheet
Dim lngBis As Long
Set Ws = ActiveSheet
With Ws
If Not .Range("A:A").Find(5, lookat:=xlWhole) Is Nothing Then
lngBis = .Range("A:A").Find(5, lookat:=xlWhole).Row
Else
MsgBox "Keine 5 gefunden!"
Exit Sub
End If
.PageSetup.PrintArea = "A1:M" & lngBis
End With
End Sub