
In Windows 10, select Start > Settings > Devices > Printers & Scanners. Alternatively, select Skip Blank Page in your printer software. You can use the Print Preview function to check for any blank pages and remove them before printing. If ActiveSheet.Name = "Sheet2" And IsEmpty(Sheets("Sheet2").Range("T5"). Make sure there’s no blank page in the document you’re trying to print. If you want to prevent printing only for Sheet 2, then do: Private Sub Workbook_BeforePrint(Cancel As Boolean) My preference would be to use the other method of explicitly qualifying the range to the desired worksheet, and avoid the need to Activate anything :) Select 'View Code' from the right-click drop-down menu. To enter this event-triggered Macro, right click on the sheet tab. If the worksheet can be active when the cells get changed, you might also need a worksheetchange event macro, but try this first. This most likely raises an error because this is not how you "activate" a worksheet, and if another sheet is "active" and Sheet2 already exists, then you're going to get a Key error. It runs a macro that hides the rows where column A is blank whenever you activate the worksheet. The only way to do so would be to use a log. That way, you reduce chances of errors as well. If you’re a perfectionist, you would want to carry out all your activities in an organized manner. A log sheet may be used for a large number of purposes. Try this: If IsEmpty(Sheets("Sheet2").Range("T5")) In simple terms, a log sheet is a blank sheet on which various logs are entered.

Free delivery, 1 warranty, 30-day money back guarantee. Up to 70 off when compared to new products. Range always resolves to the ActiveSheet unless otherwise qualified explicitly. Find the best deals on refurbished phones, laptops, and tech at Back Market.
