Page Number

Joined
Sep 14, 2011
Messages
3
Reaction score
0
Hi, using VBA. I have a sheet, total pages for printing is 10. I want in footnote show pages only upto 8 (Exp. Page1, Page2, ......... Page 8). Page 9 and Page 10 print but not show in footnote Page 9 and Page 10.

Please Help.

Ajit.
 
Sub test()

ActiveSheet.PageSetup.RightFooter = "Page &p From:=1, to:8"

End Sub
 
Sir,
I am working in Excel and want to see when I print my pages:-

-------------------------------------------------------------------------------------------------
The Civil Supply Corporation Page 1
Report for the period

and so on...... upto Page 8

I am posting some vba code:-

Private Sub worksheet_change(ByVal target As Excel.Range)
ActiveSheet.PageSetup.CenterFooter _
= "&""Times New Roman,regular""&50________________&""Times New Roman,regular""&8" _
& vbLf & Range("p20").Value _
& vbLf & Range("p21").Value
End Sub
Sub test()
'Dim TotPages As Long
'TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
'With
ActiveSheet.PageSetup.RightFooter = "Page &p From:=1, to:1"
'ActiveSheet.PrintOut From:=1, To:=1
'.RightFooter = ""
'ActiveSheet.PrintOut From:=2, To:=TotPages - 9
'End With
End Sub
 
Back
Top