Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Print sheets in order 'x' times

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Print sheets in order 'x' times

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Print sheets in order 'x' times

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Print sheets in order 'x' times

'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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Print sheets in order 'x' times

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Print sheets in order 'x' times

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Print sheets in order 'x' times

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I print sheets in Excel without blank sheets after page Peggy New Users to Excel 2 January 12th 08 11:10 AM
Printing printranges from different sheets in a specific order and as one print job jayray Excel Programming 0 June 6th 07 10:20 PM
Print sheets by "All Sheets in workbook, EXCEPT for specific named sheets". Possible? Corey Excel Programming 2 December 11th 06 01:35 AM
I want a box with the total number of times ORDER appears! tapley Excel Worksheet Functions 3 May 23rd 06 02:15 PM
Need Help w/ Print Macro to Print All Visible Sheets (including Charts) in a Workbook will Excel Programming 3 September 23rd 04 08:05 PM


All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"