VBA Duplex Print out

markman235

New Member
Joined
May 10, 2011
Messages
46
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 is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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,215,360
Messages
6,124,492
Members
449,166
Latest member
hokjock

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