Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
How do I print the same sheet multiple times with increasing page numbers?
|
#2
![]() |
|||
|
|||
![]()
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 "C&S" wrote: How do I print the same sheet multiple times with increasing page numbers? |
#3
![]() |
|||
|
|||
![]()
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? "Peter Rooney" wrote: 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 "C&S" wrote: How do I print the same sheet multiple times with increasing page numbers? |
#4
![]() |
|||
|
|||
![]()
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. |
#5
![]() |
|||
|
|||
![]()
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 "C&S" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print all charts in a workbook (multiple worksheets) | Charts and Charting in Excel | |||
Entering Data in multiple cells on one sheet & having it auto upda | Excel Worksheet Functions | |||
Print multiple excel charts within one sheet to fit to a page lik. | Excel Discussion (Misc queries) | |||
set the print area print multiple tabs | Excel Discussion (Misc queries) | |||
linking multiple sheets to a summary sheet | Excel Discussion (Misc queries) |