Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just a potential typo problem:
v= Array("A1:D20,E1:H20, . . . 30 ranges") should be: v= Array("A1:D20","E1:H20", . . . "30 ranges") Tom Ogilvy wrote: Here is some pseudo code that might do what you want: Dim v as Variant, n as Long, i as Long Dim rng as Range v= Array("A1:D20,E1:H20, . . . 30 ranges") n = 0 for i = lbound(v) to ubound(v) set rng = Range(v(i)) if application.Sum(rng) = 0 then _ exit for n = n + 1 Next i Worsheets("Master").Printout from:=1, to:=n Adjust the array to refer to the appropriate 30 ranges that each would sum up to greater than 0 if you wanted to print up to that page -- Regards, Tom Ogilvy "Dean" wrote in message ups.com... Gary, The code above highlighted both tabs my data page and master page but progressed no further. The code only needs to print off my master page. Appreciate your assistance. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing code | Excel Discussion (Misc queries) | |||
printing vba code in color | Excel Programming | |||
code for printing | Excel Programming | |||
Printing code | Excel Programming | |||
Improved printing of VBA code? | Excel Programming |