print to multiple printers (Broadcast printing)

poker

Board Regular
Joined
Oct 2, 2005
Messages
74
At work I need to be able to print to 2 different loations at the same time.
Here is what i have so far
msj = InputBox("Please select the location to send the copy:" & Chr(13) & _
"1.Printer at 1 Dk" & Chr(13) & "2.Printer at 2 Dk" & Chr(13) & _
"3.Printer at 4 Dk" & Chr(13) & "4.Printer at 5 Dk" & Chr(13) & _
"5.Printer at 6 Dk" & Chr(13) & "6.Printer at 7 Dk" & Chr(13) _
& "7.Printer in IC Office" & Chr(13) & "8.Printer in Copy Room" & Chr(13) & _
"9.Local Printer" & Chr(13), "Print Option")
If msj = 1 Then
P_rn = "\\btnprt03\BTR 3035 on Ne08:"
ElseIf msj = 2 Then
P_rn = "\\btnprt03\BTR 3103 on Ne10:"
ElseIf msj = 3 Then
P_rn = "\\btnprt03\BTR 1112 on Ne07:"
ElseIf msj = 4 Then
P_rn = "\\BTNPRT03\BTR 3105 on Ne12:"
ElseIf msj = 5 Then
P_rn = "\\btnprt03\BTR 3106 on Ne13:"
ElseIf msj = 6 Then
P_rn = "\\btnprt03\BTR 3104 on Ne11:"
ElseIf msj = 7 Then
P_rn = "\\btnprt03\BTR 1069 on Ne06:"
ElseIf msj = 8 Then
P_rn = "\\BTAPRT01\BTR 1062 on Ne04:"
ElseIf msj = 9 Then
P_rn = "Xerox WC 4118 Series PCL 6 on Ne00:"
The other printer will be :
"\\btnprt03\BTR 3051 on Ne09:"

If I select option 1 from message box I should be able to print to:
"\\btnprt03\BTR 3035 on Ne08:"
AND "\\btnprt03\BTR 3051 on Ne09:"

thanks for directions
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try this:
Code:
Sub TestName()
msj = InputBox("Please select the location to send the copy:" & Chr(13) & _
"1.Printer at 1 Dk" & Chr(13) & "2.Printer at 2 Dk" & Chr(13) & _
"3.Printer at 4 Dk" & Chr(13) & "4.Printer at 5 Dk" & Chr(13) & _
"5.Printer at 6 Dk" & Chr(13) & "6.Printer at 7 Dk" & Chr(13) _
& "7.Printer in IC Office" & Chr(13) & "8.Printer in Copy Room" & Chr(13) & _
"9.Local Printer" & Chr(13), "Print Option")
If msj = 1 Then
P_rn = "\\btnprt03\BTR 3035 on Ne08:"
ElseIf msj = 2 Then
P_rn = "\\btnprt03\BTR 3103 on Ne10:"
ElseIf msj = 3 Then
P_rn = "\\btnprt03\BTR 1112 on Ne07:"
ElseIf msj = 4 Then
P_rn = "\\BTNPRT03\BTR 3105 on Ne12:"
ElseIf msj = 5 Then
P_rn = "\\btnprt03\BTR 3106 on Ne13:"
ElseIf msj = 6 Then
P_rn = "\\btnprt03\BTR 3104 on Ne11:"
ElseIf msj = 7 Then
P_rn = "\\btnprt03\BTR 1069 on Ne06:"
ElseIf msj = 8 Then
P_rn = "\\BTAPRT01\BTR 1062 on Ne04:"
ElseIf msj = 9 Then
P_rn = "Xerox WC 4118 Series PCL 6 on Ne00:"
End If
'The other printer will be :
P_rn2 = "\\btnprt03\BTR 3051 on Ne09:"

'The following code prints the active sheet to the two printers
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
        P_rn, Collate:=True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
        P_rn2, Collate:=True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,522
Messages
6,125,312
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top