conditional printing? macro?

Giganews Newsgroups
Subject: conditional printing? macro?
Posted by:  Steven (…@where.why)
Date: Thu, 13 May 2004

here's my situation, i have a workbook with many sheets in it, each sheet if
the default print shortcut button was used would print to 4 pages of A4

the data on these sheets varies everyday, someday's only 1 page per sheet
would be full of data others 2, 3, or 4 etc. how could i write a macro that
would be able to print only the needed pages?, each page, if it contains any
data would have a value in a totals cell.

so i would need code along these lines

IF(OR(total1="",total1=0),"don't print","don't print") ELSE set data1 = TRUE
IF(OR(total2="",total2=0),"don't print","don't print") ELSE set data2 = TRUE
IF(OR(total3="",total3=0),"don't print","don't print") ELSE set data3 = TRUE
IF(OR(total4="",total4=0),"don't print","don't print") ELSE set data4 = TRUE

IF(OR(data1 ="TRUE",data1="FALSE"),"Print Page 1 to 1", "don't print")
IF(OR(data1 ="TRUE",data1="FALSE"),"Print Page 1 to 2", "don't print")
IF(OR(data1 ="TRUE",data1="FALSE"),"Print Page 1 to 3", "don't print")
IF(OR(data1 ="TRUE",data1="FALSE"),"Print Page 1 to 4", "don't print")

Hope this helps to explain what im trying to do, and someone is able to code
something that would work.

Many thanks,