Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mully
 
Posts: n/a
Default UserForm Print Extra Copies

Hi

On a user form I have a command button "Print1" which on clicking uses the
following macro to print the sheet

Sub Macro4()

Sheets("Print1").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

What would I need to add so that on clicking the command button it would ask
how many copies required.

Any help much appreciated

Cheers Mully
  #2   Report Post  
David Hepner
 
Posts: n/a
Default


Try this:

Dim x As Integer
x = InputBox("Number of copies?", "Print")
If x 0 Then
ActiveWindow.SelectedSheets.PrintOut Copies:=x, Collate:=True
Else

End If

or you could use this:

Application.Dialogs(xlDialogPrinterSetup).Show


"mully" wrote:

Hi

On a user form I have a command button "Print1" which on clicking uses the
following macro to print the sheet

Sub Macro4()

Sheets("Print1").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

What would I need to add so that on clicking the command button it would ask
how many copies required.

Any help much appreciated

Cheers Mully

  #3   Report Post  
mully
 
Posts: n/a
Default

Hi David

Thanks it worked perfectly 1st time of trying -- just one query is it
possible within the dialog box to tell it which sheet to print in the
workbook e.g. 10 copies of
"Sheet 3" and then after finishing the print run open the dialog box again 5
copies
"Sheet4"

Once again thanks for all your help.

Cheers Mully

"David Hepner" wrote:


Try this:

Dim x As Integer
x = InputBox("Number of copies?", "Print")
If x 0 Then
ActiveWindow.SelectedSheets.PrintOut Copies:=x, Collate:=True
Else

End If

or you could use this:

Application.Dialogs(xlDialogPrinterSetup).Show


"mully" wrote:

Hi

On a user form I have a command button "Print1" which on clicking uses the
following macro to print the sheet

Sub Macro4()

Sheets("Print1").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

What would I need to add so that on clicking the command button it would ask
how many copies required.

Any help much appreciated

Cheers Mully

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
Print Copy limit gocats Excel Discussion (Misc queries) 8 August 26th 05 01:33 AM
HOW DO I PRINT MULTIPLE COPIES IN EXCEL jbenowl16 Excel Discussion (Misc queries) 3 July 4th 05 05:11 PM
print multiple copies of the same page with sequential numbers labrat Excel Discussion (Misc queries) 1 June 14th 05 05:32 PM
Can one have an extra margin gutter, for binding a document print. DaveT Excel Discussion (Misc queries) 1 February 14th 05 03:01 PM
Printing - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM


All times are GMT +1. The time now is 12:40 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"