Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook from which I need to print 15 worksheets. My macro works
fine to do this, however I now need to print more than one copy but would like them printed in order, i.e. page 1, page 2, page 3 etc 5 times rather than 5x page 1, 5x page2, etc. How do I add this in? And can I change the number printed each time? I'm a complete novice with VBA and my only knowledge is cannibalisation of existing macros, so simplicity would be appreciated!! Many thanks Kate |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Without seeing your code that prints the 15 sheets it's a bit difficult to
answer. However, The code below will print x copies of each sheet in orde which you should be able to adapt. Sub mariner() numbertoprint = InputBox("How many copies of each") Dim sh As Worksheet For x = 1 To numbertoprint For Each sh In ThisWorkbook.Worksheets sh.Select ActiveSheet.PrintOut Next sh Next End Sub Mike "KateB" wrote: I have a workbook from which I need to print 15 worksheets. My macro works fine to do this, however I now need to print more than one copy but would like them printed in order, i.e. page 1, page 2, page 3 etc 5 times rather than 5x page 1, 5x page2, etc. How do I add this in? And can I change the number printed each time? I'm a complete novice with VBA and my only knowledge is cannibalisation of existing macros, so simplicity would be appreciated!! Many thanks Kate |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub PrintSheets()
Dim x as Integer, Y as Integer x = InputBox("How many Copies?) For y = t to x Do 'Print one set y = y 6+ 1 Loop until y x End Sub -- Pops Jackson "KateB" wrote: I have a workbook from which I need to print 15 worksheets. My macro works fine to do this, however I now need to print more than one copy but would like them printed in order, i.e. page 1, page 2, page 3 etc 5 times rather than 5x page 1, 5x page2, etc. How do I add this in? And can I change the number printed each time? I'm a complete novice with VBA and my only knowledge is cannibalisation of existing macros, so simplicity would be appreciated!! Many thanks Kate |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'TYPO!
'Should read For y = 1 to x Sorry. -- Pops Jackson "Pops Jackson" wrote: Sub PrintSheets() Dim x as Integer, Y as Integer x = InputBox("How many Copies?) For y = t to x Do 'Print one set y = y 6+ 1 Loop until y x End Sub -- Pops Jackson "KateB" wrote: I have a workbook from which I need to print 15 worksheets. My macro works fine to do this, however I now need to print more than one copy but would like them printed in order, i.e. page 1, page 2, page 3 etc 5 times rather than 5x page 1, 5x page2, etc. How do I add this in? And can I change the number printed each time? I'm a complete novice with VBA and my only knowledge is cannibalisation of existing macros, so simplicity would be appreciated!! Many thanks Kate |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another Typo!
y = y + 1 Sorry again. Is it Friday yet? -- Pops Jackson "Pops Jackson" wrote: Sub PrintSheets() Dim x as Integer, Y as Integer x = InputBox("How many Copies?) For y = t to x Do 'Print one set y = y 6+ 1 Loop until y x End Sub -- Pops Jackson "KateB" wrote: I have a workbook from which I need to print 15 worksheets. My macro works fine to do this, however I now need to print more than one copy but would like them printed in order, i.e. page 1, page 2, page 3 etc 5 times rather than 5x page 1, 5x page2, etc. How do I add this in? And can I change the number printed each time? I'm a complete novice with VBA and my only knowledge is cannibalisation of existing macros, so simplicity would be appreciated!! Many thanks Kate |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
mike:
it should work without selecting each sheet Sub mariner() Dim numbertoprint As Long, x As Long numbertoprint = InputBox("How many copies of each") Dim sh As Worksheet For x = 1 To numbertoprint For Each sh In ThisWorkbook.Worksheets sh.PrintPreview Next sh Next End Sub -- Gary "Mike H" wrote in message ... Without seeing your code that prints the 15 sheets it's a bit difficult to answer. However, The code below will print x copies of each sheet in orde which you should be able to adapt. Sub mariner() numbertoprint = InputBox("How many copies of each") Dim sh As Worksheet For x = 1 To numbertoprint For Each sh In ThisWorkbook.Worksheets sh.Select ActiveSheet.PrintOut Next sh Next End Sub Mike "KateB" wrote: I have a workbook from which I need to print 15 worksheets. My macro works fine to do this, however I now need to print more than one copy but would like them printed in order, i.e. page 1, page 2, page 3 etc 5 times rather than 5x page 1, 5x page2, etc. How do I add this in? And can I change the number printed each time? I'm a complete novice with VBA and my only knowledge is cannibalisation of existing macros, so simplicity would be appreciated!! Many thanks Kate |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the suggestions - for some reason I can't access the MS discussion
groups from work so will have to print it off and try it out tomorrow. I probably should have said that I am printing 15 worksheets out of about 28 - the others are raw data linking through. Thanks again! Kate "Pops Jackson" wrote: Another Typo! y = y + 1 Sorry again. Is it Friday yet? -- Pops Jackson "Pops Jackson" wrote: Sub PrintSheets() Dim x as Integer, Y as Integer x = InputBox("How many Copies?) For y = t to x Do 'Print one set y = y 6+ 1 Loop until y x End Sub -- Pops Jackson "KateB" wrote: I have a workbook from which I need to print 15 worksheets. My macro works fine to do this, however I now need to print more than one copy but would like them printed in order, i.e. page 1, page 2, page 3 etc 5 times rather than 5x page 1, 5x page2, etc. How do I add this in? And can I change the number printed each time? I'm a complete novice with VBA and my only knowledge is cannibalisation of existing macros, so simplicity would be appreciated!! Many thanks Kate |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I print sheets in Excel without blank sheets after page | New Users to Excel | |||
Printing printranges from different sheets in a specific order and as one print job | Excel Programming | |||
Print sheets by "All Sheets in workbook, EXCEPT for specific named sheets". Possible? | Excel Programming | |||
I want a box with the total number of times ORDER appears! | Excel Worksheet Functions | |||
Need Help w/ Print Macro to Print All Visible Sheets (including Charts) in a Workbook | Excel Programming |