Question:

Excel 2003 Macro That Will Copy All Of Print Page 1 and Paste it on Print Page 2.?

by  |  earlier

0 LIKES UnLike

I need a macro that will allow me to copy everything on my first print page and paste it to a second page and if clicked a third time will paste it to a third page and so on. This all has to be done within the same worksheet. Thank you for your help.

 Tags:

   Report

1 ANSWERS


  1. Assume the your page range is A1:B10, when you activate macro it will copy to A11:B20, then to A21:B30 etc

    Alt+F11, to go to vb editor, right click on the left side icon, then insert a module to the workbook, click the module, and on the right blank area add the code below

    Sub copyPg()

       pageAddress = "$A$1:$B$10" 'change this to suit your page range

       Range( pageAddress).Copy

       stRng = Split( ActiveSheet.UsedRange.Address, ":")

       ActiveSheet.Paste Destination:=Cells( Range(stRng( 1)).Row + 1, Range( stRng( 0)).Column)

       CutCopyMode = False

    End Sub

    Alt+F8, click the name copyPg, click option button, set a shortcut, say ctrl+Shift+A, click ok button, then whenever you want to copy the page range, ctrl+shift+A to activate the macro.

    Note: if you want to use this code across sheets, with different page range, instead of changing range address in 1st line of code, set the page range as print range for each sheet and use the following line as 1st line of code instead.

    pageAddress = ActiveSheet.PageSetup.PrintArea

    Please contact for more info.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.