How do I print the same sheet multiple times with increasing page.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I print the same sheet multiple times with increasing page numbers?
 
C&S,

You could try something like this:

Sub MultiPrint()
Dim PrintCount As Integer
For PrintCount = 1 To 5
ActiveSheet.PageSetup.CenterFooter = "Page " & PrintCount
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next
End Sub

To increase the number of prints, simply change the "5" to whatever value
you require

Hope this helps

Pete
 
Thank you very much! But where do you type this? Is it a script file? If so,
how do you get excel to run it?
 
How do you let the program know that you want to print multiple copies. It
is only printing one. I got it into the visual basic, but the print preview
only shows one copy. Thanks.
 
Hi, C&S!

Have you copied the code into a Visual Basic module?

From your worksheet, press Alt+F11

Click "Insert" and "Module" from the menu

Paste the code into the module sheet that is inserted

Press Alt+F11 again to go back to your worksheet

Click on "Tools" "Macro" "Macros" from the menu

Double click "Multiprint" (the macro name from) box that is displayed.

You can only see one copy in Print Preview because it doesn't know about the
code.

Sub MultiPrint()
Dim PrintCount As Integer
For PrintCount = 1 To 5
ActiveSheet.PageSetup.CenterFooter = "Page " & PrintCount
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next
End Sub

When you run the macro in the manner shown above, you'll get 5 prints, each
one with an incrementing page number. If you change "1 to 5" in line 3 to,
dor example, "1 to 10", you'll get 10 copies.

This is a simple Visual Basic programming loop that counts from one number
to another number and places the value of the count in the footer string.

Hope this helps, and that it encourages you to try some VBA of your own! Try
recording code as you do things, and going into the module to see how code
gets built up!

Regards

Pete





Sub MultiPrint()
Dim PrintCount As Integer
For PrintCount = 1 To 5
ActiveSheet.PageSetup.CenterFooter = "Page " & PrintCount
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next
End Sub
 

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

Back
Top