Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro for multiple prints

I have a simple three sheet workbook which contains the macro below to print
one part of one of the sheets. I wish to amend it to print several copies,
depending on the user input in cell G16 of sheet "Input". Can I alter the
Selection.Printout line of the macro or should I use a loop structure? In
either case some help on the syntax would be appreciated.

Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
Selection.PrintOut Copies:=1, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Macro for multiple prints

This is one way:


Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
numCpy = Application.InputBox("Enter number of Copies")
Selection.PrintOut Copies:=numCpy, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub



"Leporello" wrote in message
...
I have a simple three sheet workbook which contains the macro below to
print
one part of one of the sheets. I wish to amend it to print several
copies,
depending on the user input in cell G16 of sheet "Input". Can I alter the
Selection.Printout line of the macro or should I use a loop structure? In
either case some help on the syntax would be appreciated.

Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
Selection.PrintOut Copies:=1, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro for multiple prints

Thank you.

Your solution does work, but it creates a dialogue box which appears after
the macro has been called and requires a user input. The number of copies,
together with various other information, has already been entered into the
sheet "Input", and I really want a way of taking the existing value from the
"Input" sheet and using it directly to control the print operation.
Something like numCpy = Input!G16 but with the correct syntax to allow it to
work!

"JLGWhiz" wrote:

This is one way:


Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
numCpy = Application.InputBox("Enter number of Copies")
Selection.PrintOut Copies:=numCpy, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub



"Leporello" wrote in message
...
I have a simple three sheet workbook which contains the macro below to
print
one part of one of the sheets. I wish to amend it to print several
copies,
depending on the user input in cell G16 of sheet "Input". Can I alter the
Selection.Printout line of the macro or should I use a loop structure? In
either case some help on the syntax would be appreciated.

Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
Selection.PrintOut Copies:=1, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Macro for multiple prints

Then this should do it.

Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
numCpy = Range("G16").Value
Selection.PrintOut Copies:=numCpy, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub




"Leporello" wrote in message
...
Thank you.

Your solution does work, but it creates a dialogue box which appears after
the macro has been called and requires a user input. The number of
copies,
together with various other information, has already been entered into the
sheet "Input", and I really want a way of taking the existing value from
the
"Input" sheet and using it directly to control the print operation.
Something like numCpy = Input!G16 but with the correct syntax to allow it
to
work!

"JLGWhiz" wrote:

This is one way:


Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
numCpy = Application.InputBox("Enter number of Copies")
Selection.PrintOut Copies:=numCpy, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub



"Leporello" wrote in message
...
I have a simple three sheet workbook which contains the macro below to
print
one part of one of the sheets. I wish to amend it to print several
copies,
depending on the user input in cell G16 of sheet "Input". Can I alter
the
Selection.Printout line of the macro or should I use a loop structure?
In
either case some help on the syntax would be appreciated.

Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
Selection.PrintOut Copies:=1, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro for multiple prints

Thankk you, that was the information I needed to make it work.



"JLGWhiz" wrote:

Then this should do it.

Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
numCpy = Range("G16").Value
Selection.PrintOut Copies:=numCpy, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub




"Leporello" wrote in message
...
Thank you.

Your solution does work, but it creates a dialogue box which appears after
the macro has been called and requires a user input. The number of
copies,
together with various other information, has already been entered into the
sheet "Input", and I really want a way of taking the existing value from
the
"Input" sheet and using it directly to control the print operation.
Something like numCpy = Input!G16 but with the correct syntax to allow it
to
work!

"JLGWhiz" wrote:

This is one way:


Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
numCpy = Application.InputBox("Enter number of Copies")
Selection.PrintOut Copies:=numCpy, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub



"Leporello" wrote in message
...
I have a simple three sheet workbook which contains the macro below to
print
one part of one of the sheets. I wish to amend it to print several
copies,
depending on the user input in cell G16 of sheet "Input". Can I alter
the
Selection.Printout line of the macro or should I use a loop structure?
In
either case some help on the syntax would be appreciated.

Sub Button6_Click()
'
' Button6_Click Macro
' Macro recorded 03/08/2009 by
'
Sheets("Mark sheet").Select
Range("A1:H56").Select
Range("H56").Activate
Selection.PrintOut Copies:=1, Collate:=True
Sheets("Input").Select
Range("A1").Select
End Sub






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 keep heading so it prints on multiple pages de2137 Excel Discussion (Misc queries) 5 October 17th 06 12:10 PM
when printing multiple sheets, first prints single side rest doub. Loz Setting up and Configuration of Excel 0 May 18th 06 04:42 AM
½ symbol prints a 2 and Winding square box prints a F frank-e Excel Discussion (Misc queries) 2 March 22nd 06 10:03 PM
multiple prints in Excel JohnC Excel Discussion (Misc queries) 0 November 28th 05 10:01 PM
macro only prints out first and last line of document lschuh Excel Programming 7 August 5th 05 03:27 PM


All times are GMT +1. The time now is 09:38 AM.

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

About Us

"It's about Microsoft Excel"