Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

set print area from selected range

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Graham Whitehead - 12 Jul 2006 09:43 GMT
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.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.