UserForm Print Extra Copies

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top