Hi all,
The macro below is printing me the list od data but I need also the title Row from H2:N2 on each page its printed.
How can I do this?
Dim FilVal As String
With ActiveSheet.UsedRange
'With Range("A2").CurrentRegion
FilVal = InputBox(Prompt:="Enter the Pallet Number you want to print", _
Title:="Input")
If FilVal = vbNullString Then
Exit Sub
Else
.AutoFilter 7, FilVal
End If
If .SpecialCells(12).count = 26 Then MsgBox "Nothing to Print!": .AutoFilter: Exit Sub
ActiveSheet.PageSetup.PrintArea = ActiveSheet.Range("H2:N" & Range("K" & Rows.count).End(xlUp).Row).Address
ActiveSheet.PageSetup.TopMargin = 60
ActiveSheet.PageSetup.RightHeader = _
"&""Arial""&30&B Pallet No. " & FilVal
ActiveSheet.PrintPreview
ActiveSheet.PageSetup.PrintArea = ""
.AutoFilter
End With
Bookmarks