Forum Discussion
Macro to change DPI
Good day!
First off, I am not an Excel expert at all, so I apologize for a question that may or may not be really dumb 🙂
I am in need of a macro in Excel that would change the DPI of a single worksheet. The reason for this is because occasionally I have a worksheet that needs to be set to 204x196 DPI in order to print/fax properly. I would basically like to achieve what is in this guide: https://support.microsoft.com/en-us/office/change-the-print-resolution-or-print-quality-for-a-worksheet-b0e11707-1e47-4452-810f-0f4deb038455 but through a macro.
If it needs to be done manually that is fine, but hopefully someone can provide some guidance? 🙂 Thank you!!
2 Replies
You can use this for the active sheet:
ActiveSheet.PageSetup.PrintQuality = Array(240, 196)
or for a specific sheet that is not necessarily the active sheet:
Worksheets("Specific Sheet").PageSetup.PrintQuality = Array(240, 196)
But the active printer must support that, otherwise you'll get an error message.
- Logan_WeaverCopper ContributorThank you! I'll test this out.