how can i print non adjacent pages from a worksheet

S

sumesh56

how can i print non- adjecent pages in excel 2007

I have an excel sheet of 154 pages. I want to print only pages 1,5
and 154. what i am doing is print pages one by one.first give th
command to page i then 51 then 154. how can i give the command in one g
so that it is printed the required pages only


tried to "print pages" in the print options 1,51,154 and 1. 51. 15
but failed
 
C

Claus Busch

Hi,

Am Fri, 4 Apr 2014 02:57:02 +0100 schrieb sumesh56:
I have an excel sheet of 154 pages. I want to print only pages 1,51
and 154. what i am doing is print pages one by one.first give the
command to page i then 51 then 154. how can i give the command in one go
so that it is printed the required pages only.

try it with a macro. Modify the print array to your expected pages:

Sub PrintPages()
Dim arrPrint As Variant
Dim i As Long

arrPrint = Array(1, 3, 7)

For i = LBound(arrPrint) To UBound(arrPrint)
ActiveSheet.PrintOut from:=arrPrint(i), _
to:=arrPrint(i), copies:=1
Next
End Sub


Regards
Claus B.
 

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

Top