S
Stuart
I'm looping through workbooks, establishing ranges then
printing them, but only if a 'total' is neither blank or zero.
I have:
For i = 1 To UBound(Printvarr)
If Not (IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) Or _
IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) _
Or Pagevarr(i + 1).Offset(-1, £Col).Value _
= "0.00") Then
'for testing ... toggle as required
Printvarr(i).PrintPreview
Printvarr(i).PrintOut
End If
Next
This code seems to print all ranges correctly, but includes
zero and blank pages.
If I say:
For i = 1 To UBound(Printvarr)
ws.Activate
Pagevarr(i + 1).Offset(-1, £Col).Select
If Not (IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) Or _
IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) _
Or Pagevarr(i + 1).Offset(-1, £Col).Value _
= "0.00") Then
'for testing ... toggle as required
Printvarr(i).PrintPreview
Printvarr(i).PrintOut
End If
Next
Now it seems to exclude empty and zero pages.
If I'm right, then how to Select, please?
Regards.
printing them, but only if a 'total' is neither blank or zero.
I have:
For i = 1 To UBound(Printvarr)
If Not (IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) Or _
IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) _
Or Pagevarr(i + 1).Offset(-1, £Col).Value _
= "0.00") Then
'for testing ... toggle as required
Printvarr(i).PrintPreview
Printvarr(i).PrintOut
End If
Next
This code seems to print all ranges correctly, but includes
zero and blank pages.
If I say:
For i = 1 To UBound(Printvarr)
ws.Activate
Pagevarr(i + 1).Offset(-1, £Col).Select
If Not (IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) Or _
IsEmpty(Pagevarr(i + 1).Offset(-1, £Col)) _
Or Pagevarr(i + 1).Offset(-1, £Col).Value _
= "0.00") Then
'for testing ... toggle as required
Printvarr(i).PrintPreview
Printvarr(i).PrintOut
End If
Next
Now it seems to exclude empty and zero pages.
If I'm right, then how to Select, please?
Regards.