SpiffyMasta
12-09-2011, 12:45 PM
I'm trying to write some code for setting up a print area dependent on whether a certain range has data or no data input. I'm still learning VBA code and this seems like no matter what I try it's out of my league.
The code I want needs to
//
IF there is any data (in this case it will be numbers and maybe text, the cells are otherwise completely empty) in cells AB6:AU19
Then
set the .PrintArea = "A3:BA44" .FitToPagesWide = 2 .FitToPagesTall = 1
Else If the same cells are empty then
set the .PrintArea = "A3:AA44" .FitToPagesWide = 1 .FitToPagesTall = 1
//
Thank you for any help you can provide!
The code I want needs to
//
IF there is any data (in this case it will be numbers and maybe text, the cells are otherwise completely empty) in cells AB6:AU19
Then
set the .PrintArea = "A3:BA44" .FitToPagesWide = 2 .FitToPagesTall = 1
Else If the same cells are empty then
set the .PrintArea = "A3:AA44" .FitToPagesWide = 1 .FitToPagesTall = 1
//
Thank you for any help you can provide!