View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How to print last page of sheet?

Hi

Try this

Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
ActiveSheet.PrintOut From:=TotPages, To:=TotPages
End Sub


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


"kcm" wrote in message ...
Hi,

I would like to print only the last page of a sheet with the simple click on a button, but I cannot find a way to program that.

Thanks for any help on the subject.

Kees