Footer on last page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want a footer to appear only on the last page of a form.
How do I accomplish this? The form could have from 1 to 5 pages.
 
Hi Line

You can do it with a macro

Try this to print the activesheet

Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.RightHeader = ""
ActiveSheet.PrintOut From:=1, To:=TotPages - 1
.RightHeader = "Your Header info"
ActiveSheet.PrintOut From:=TotPages, To:=TotPages
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

Back
Top