set print area from selected range



Hi, I have some code which selected a certain amount of columns depending on
whether they contain values or not. Once I have this range set and I select
it I want to set this as the print area. I am not quite sure how to do
this. for example I tried:

rngUnion.Select
Active***.PageSetup.PrintArea = ActiveCell.CurrentRegion.Address

But to no avail. Any help would be gratefully received.


.


Loading