Can anyone help with the following macro? I'm trying to get it to print one copy each of the worksheets "po", "copy" & "site copy" but for some reason I'm getting three copies of each.
And when I manually go file>print in this file, the printer settings default to 3 copies. Where is it getting this setting from and how do I change it?
Sub num_audit_print()
select_printer 'calls select_printer procedure
Application.ScreenUpdating = False
'OK to continue?
Msg = "OK To Continue ?"
Style = vbOKCancel + vbDefaultButton1
Response = MsgBox(Msg, Style)
If Response = vbOK Then
Else
GoTo endsub
End If
num_audit 'calls num_audit procedure
Application.ScreenUpdating = True
printagain:
Application.ScreenUpdating = False
' Make distribution copies
Worksheets("po").Copy after:=Worksheets("po")
ActiveSheet.Name = "COPY"
Worksheets("COPY").Copy after:=Worksheets("COPY")
ActiveSheet.Name = "SITE COPY"
Sheets("COPY").Select
Range("D2:K5").Select
ActiveCell.FormulaR1C1 = "COPY"
Sheets("SITE COPY").Select
Range("D2:K5").Select
ActiveCell.FormulaR1C1 = "SITE COPY"
Sheets("po").Select
' Print out the array of Sheets
Sheets(Array("po", "COPY", "SITE COPY")).Select
Sheets("po").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
'Delete the copies temporarily turning off display alert
Sheets(Array("COPY", "SITE COPY")).Select
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Msg = "Print Again ?" & Chr(13) & _
"THIS MUST ONLY BE USED IF THE FIRST PRINT WAS NOT SUCCESSFUL"
Style = vbYesNo + vbDefaultButton2
Response = MsgBox(Msg, Style)
If Response = vbYes Then
GoTo printagain
Else
End If
select_printer 'calls select_printer procedure
endsub:
End Sub
Bookmarks