VBA Duplex Print out

markman235

Board Regular
Joined
May 10, 2011
Messages
52
Hi everyone,

I have been working with this basic macro the last few days, and you guys have been amazing. I just have one last question on this.

It will print the first two sheets, but I can't get it to print them Duplex. I tried adjusting the page settings and printer setting, but this seems to override anything I change.

Any thoughts?

Thanks,

Mark

Sub EmployeeList()
Dim c As Range
For Each c In Sheet3.Range("A2", Sheet3.Cells(Rows.Count, 1).End(xlUp)) ' makes range dynamic
If c <> "" Then Sheet1.Range("A12") = c.Value
If c <> "" Then Sheet1.Range("C2") = c.Value
Sheet1.PrintOut
Sheet2.PrintOut
Next

End Sub
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
What about using the printer dialog to configure the printer for duplex printing before you begin to loop through the cells?

Code:
Sub EmployeeList()
    Dim c As Range
    Application.Dialogs(xlDialogPrinterSetup).Show
    For Each c In Sheet3.Range("A2", Sheet3.Cells(Rows.Count, 1).End(xlUp))    ' makes range dynamic
        If c <> "" Then Sheet1.Range("A12") = c.Value
        If c <> "" Then Sheet1.Range("C2") = c.Value
        Sheet1.PrintOut
        Sheet2.PrintOut
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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