How to print uneven pages Excel 97

D

David D

I need to print uneven pages only in Microsoft Excel 97.
I am new to this. Could someone help please. Thanks.
David
 
G

Gord Dibben

David

Sub PrintDoubleSided()
Dim Totalpages As Long
Dim pg As Long
Dim oddoreven As Integer
On Error GoTo enditt
Totalpages = ExecuteExcel4Macro("Get.Document(50)")
oddoreven = InputBox("Enter 1 for Odd, 2 for Even")
For pg = oddoreven To Totalpages Step 2
ActiveWindow.SelectedSheets.PrintOut from:=pg, To:=pg
Next pg
enditt:
End Sub

Note Dave P.'s pointer to David McRitchie's "Getting Started with Macros"

Gord Dibben XL2002
 
Top