View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How do I print a footer on the last page only of an excel doc?

Hi Tc

I not see code but I have this on my site
http://www.rondebruin.nl/print.htm#Header

You can do this

Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.RightFooter = ""
ActiveSheet.PrintOut From:=1, To:=TotPages - 1
.RightFooter = "Your Header info"
ActiveSheet.PrintOut From:=TotPages, To:=TotPages
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"TC" wrote in message ...
I have some experience with VB code but not much. Could someone please
explain what parts of this code I have to edit and enter specific information
for my worksheet to get this code to run.
Thanks
Tim