Printing odd and even pages

Rebuild8

New Member
Joined
Mar 24, 2010
Messages
43
I currently have a macro saved as a text file on my desktop that I copy and paste into Excel whenever I want to print odd or even pages. Is there a way I can set it up so that if I have any Excel file open (that is in my Documents folder) that I just use a shortcut (Ctrl+U, for example) and my macro will run? If so, would this slow my computer down considerably?

Also, is there an add-in for Excel 2007 that will enable Excel to print odd or even pages?

Thanks for any help!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Paste This into the Thisworkbook Code Module and Select Print Preview to test..


Code:
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
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,405
Members
452,911
Latest member
a_barila

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top