Method to automate page numbers on single worksheet
Hi Burl
Try this as an example to produce Page of Pages instead of using Cells (
Unless there is another reason you have to point to a cell ).
Sub PrintReport()
Dim myWkS As Worksheet
Set myWkS = ActiveSheet
With myWkS.PageSetup
.RightHeader = "&P" & " of " & "&N"
.FitToPagesWide = 1
End With
myWkS.PrintOut Preview:=True
End Sub
HTH
Mick
|