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