Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Footer

Status
Not open for further replies.

iken

Mechanical
Joined
May 13, 2003
Messages
151
Location
NZ
Is it possible to have a footer appear on the last page only.

Sometimes there will be one page, and other times there will be two pages.

It doesn't have to be a footer, but perhaps code to insert text on last page only.

Many thanks
 
Last Page depends upon how many rows are included in one page, as you can preview and adjust by means of "View - PageBreak Preview" tool.

A very rudimentary method could be (after having defined a Print_Area using "File - Print_Area - Set Print_Area" with some spare rows for footer):

Private Sub Worksheet_Activate()
b$= ActiveSheet.PageSetup.PrintArea
k=Range(b$).Rows.Count \ 52 ' assuming 52 rows per page
[A1].Offset(52*k +15, 1)="THIS IS MY FOOTER !" ' 15 rows
End Sub

Hope it helps
_LF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top