Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Printing based on a value of a range

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Summing a range of cells based on criteria in another range Jack Excel Worksheet Functions 2 November 5th 09 01:46 AM
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM
Define a range based on another named range Basil Excel Worksheet Functions 2 February 21st 05 01:47 PM


All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"