ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to Avoid Printing Blank Rows (https://www.excelbanter.com/excel-programming/281144-how-avoid-printing-blank-rows.html)

Yogesh[_3_]

How to Avoid Printing Blank Rows
 
Hi All,

How do i avoid printing blank rows in a Selected Range of cells using
VBScript.

Thank you,



Tom Ogilvy

How to Avoid Printing Blank Rows
 
Dim rng as range
On error resume Next
set rng = Selection.Specialcells(xlBlanks)
On error goto 0
if not rng is nothing then rng.EntireRow.Hidden = True
Selection.Printout
if not rng is nothing then rng.EntireRow.Hidden = False

--
Regards,
Tom Ogilvy


Yogesh wrote in message
...
Hi All,

How do i avoid printing blank rows in a Selected Range of cells using
VBScript.

Thank you,






All times are GMT +1. The time now is 09:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com