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
ActiveSheet.PageSetup.PrintArea = ActiveCell.CurrentRegion.Address
But to no avail. Any help would be gratefully received.
Ardus Petus - 12 Jul 2006 09:47 GMT
Try:
ActiveSheet.PageSetup.PrintArea = Selection.address
HTH
--
AP
> 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
[quoted text clipped - 5 lines]
>
> But to no avail. Any help would be gratefully received.
Graham Whitehead - 12 Jul 2006 09:58 GMT
Thanks, but didnt work.
> Try:
> ActiveSheet.PageSetup.PrintArea = Selection.address
[quoted text clipped - 12 lines]
>>
>> But to no avail. Any help would be gratefully received.
Ardus Petus - 12 Jul 2006 10:03 GMT
The code I gave you sets the current selection as printarea.
Select something else!
Cheers,
--
AP
> Thanks, but didnt work.
>
[quoted text clipped - 14 lines]
>>>
>>> But to no avail. Any help would be gratefully received.