ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Limit printing to certain 'pages' based on value (https://www.excelbanter.com/excel-programming/297624-limit-printing-certain-pages-based-value.html)

Stuart[_5_]

Limit printing to certain 'pages' based on value
 
How best to write this statement, please?:

If (Wkbk_PrintZeroPages = False Or _
Wkbk_PrintBlankPages = False) Then
'do not print empty/blank or zero pages,
'so test the 'total' cell for this page:
If (Pagevarr(i+1).Offset(-1, £Col).Value = 'blank/empty
' Or
"0"
' Or
"0.00"
' etc
Then Exit For
Else
Printvarr(i).PrintOut
End If
End If

Would I cover all bets with this statement?:
If the value in the total cell is Numeric and zero Then?
seeing as there should only be numeric entries in the total cell,
if anything at all.

What's my best solution, please?

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.674 / Virus Database: 436 - Release Date: 02/05/2004




All times are GMT +1. The time now is 08:09 PM.

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