Restrict user from printing empty pages in excel vba

Closed
pooja - Oct 23, 2015 at 09:20 AM
 pooja - Oct 26, 2015 at 12:31 AM
Hello,

I have three print areas in a single sheet. If I print that sheet, it prints 3 pages(print areas). Is there any way to print only the print area(s) with data. I don't want to print empty print area(s). I need to done only through VBA. Does anyone have idea to achieve this?

Thanks in advance!

Related:

2 responses

Blocked Profile
Oct 23, 2015 at 06:02 PM
Try to loop through this logic:
Sheets("Sheet2").Select
    Range("A3:G38").Select
    ActiveSheet.PageSetup.PrintArea = "$A$3:$G$38"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True


I have said it once, I will say it again. IT!
0
Thanks ac3mark!.
0