D
Dave
I'm attempting to write an event procedure that will reformat the
print area a worksheet in a mulit-sheet workbook based on the value of
a specified range of cells prior to printing. The object is to allow
excel to know to only print the first page of a 2 page worksheet if
the values in the specified range are equal to zero.
Example:
Workbook1 has 3 sheets called A, B, C.
SheetA contains a range called myrange containing 4 cells called
1,2,3,4.
Sheet A is the multi page sheet and the others are not.
When the user prints workbook1 or a part of workbook1, prior to
printing the code should:
Evaluate wether SheetA is going to be printed. If so it should then
evaluate myrange to see if any cells contain a non-zero value. If this
is true then the program should print the entire SheetA. If all the
cells in myrange are zero values then it should apply the print area
formatting. If sheetA is NOT going to be printed the procedure should
exit.
If anyone has a good way to do this please let me know!
D
print area a worksheet in a mulit-sheet workbook based on the value of
a specified range of cells prior to printing. The object is to allow
excel to know to only print the first page of a 2 page worksheet if
the values in the specified range are equal to zero.
Example:
Workbook1 has 3 sheets called A, B, C.
SheetA contains a range called myrange containing 4 cells called
1,2,3,4.
Sheet A is the multi page sheet and the others are not.
When the user prints workbook1 or a part of workbook1, prior to
printing the code should:
Evaluate wether SheetA is going to be printed. If so it should then
evaluate myrange to see if any cells contain a non-zero value. If this
is true then the program should print the entire SheetA. If all the
cells in myrange are zero values then it should apply the print area
formatting. If sheetA is NOT going to be printed the procedure should
exit.
If anyone has a good way to do this please let me know!
D