Printing every other page


Posted by Scott Antonivich on June 14, 2001 1:00 PM

Hi,

I just started using MS Excel to database my music collection. I would like to be able to print on each side of the page. I can't seem to find any easy way to do this. I thought this is usually handled by the printer but I am not finding it. Another solution would be to have MS Excel print out just the even pages.....than I can reverse the paper and than have Excel print the odd pages. Does anyone know how to do this??????Thanks in advance!

Posted by Russell on June 14, 2001 2:52 PM

Here's what I would do:

First, I would name my sheets as numbers: say 1 through 25. Then you could use the following code (there's more than one way to skin a cat, as they say):

Option Explicit

Function PrintAlt(Optional blnEven As Boolean = False)

Dim intEven As Integer
Dim xls As Worksheet

If Not blnEven Then
intEven = 1
End If

For Each xls In ActiveWorkbook.Worksheets
If Int(xls.Name) Mod 2 = intEven Then
xls.PrintOut
End If
Next xls

End Function

Sub PrintEven()
PrintAlt True
End Sub

Sub PrintOdd()
PrintAlt False
End Sub

Posted by zen on June 14, 2001 3:01 PM

don't thank so easily, i believe although i'm often wrong, that you can't print sheet1 then sheet2 on the back, as excel sees different page no's only on one sheet. It's a problem i'd like an answer to also, the solution is to have the value of sheet2 on sheet1, 4 on 3 and so on, directly next to the sheet1, 3, 5etc data. i.e. in acel put =a1 and copy it over. then you can set the margins for sheet1 to print the two pages. it's not the best thing in the world but it's the only thing i can think of, it doesn't work for me as i can't have two sheet on one page (Co. rules).
alternatively you could record two macros (if you've that many sheets) one that selects 1 3 5 etc and one that selects 2 4 6.

not very helpful but an answer of sorts.

good luck zen

(to anyone reading this, i posted the same thing a while ago and didn't get an answer, that's now two people, please let us know if it can/can't be done, thanks zen)

Posted by Chuck on June 14, 2001 6:09 PM

And yet another way


Sub PrintAlternatePages()


TotalPages = 8 ' Enter total number of pages that will be printed out

'On first pass set i to 1, on the second pass set i to 2

i = 1

Do Until i >= TotalPages

ActiveWindow.SelectedSheets.PrintOut From:=i, To:=i
i = i + 2
Loop


End Sub



Posted by steve w on June 14, 2001 6:53 PM

Try using a commandbutton to print, use one for odds and one for evens. Thats how I would do it.
Change ranges and sheet names to suit.
Let me know if you need more help.
Steve w

Private Sub CommandButton1_Click()
Sheet3.Range("A1:Y35").PrintOut
Sheet3.Range("AQ1:BN35").PrintOut
End Sub
Private Sub CommandButton2_Click()
Sheet3.Range("A36:Y70").PrintOut
Sheet3.Range("AQ36:BN70").PrintOut
End Sub