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.
 
Joined
Sep 14, 2011
Messages
3
Reaction score
0
Sub test()

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

End Sub
 
Joined
Sep 14, 2011
Messages
3
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top