PC Review


Reply
Thread Tools Rate Thread

Changing the print_area

 
 
=?Utf-8?B?QXJ0aHVySg==?=
Guest
Posts: n/a
 
      23rd Oct 2006
With code I would like to change the print_area range to be the same as
another range. Something like these three lines (though this doesn't work):

Dim r As Range
Set r = range("myRange")
Range("print_area") = r

How do I do this?
 
Reply With Quote
 
 
 
 
Ken
Guest
Posts: n/a
 
      23rd Oct 2006
Arthur

Try:

ActiveSheet.PageSetup.PrintArea = "myRange"

Good luck

Ken
Norfolk, Va


ArthurJ wrote:
> With code I would like to change the print_area range to be the same as
> another range. Something like these three lines (though this doesn't work):
>
> Dim r As Range
> Set r = range("myRange")
> Range("print_area") = r
>
> How do I do this?


 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      24th Oct 2006
If you check "PrintArea" in the Help or the Object Browser, you will see if
returns/sets a String.
So you need to pass the address of the Range object, not the Range object
itself.

NickHK

"ArthurJ" <(E-Mail Removed)> wrote in message
news:23482C51-404A-41A9-BBA3-(E-Mail Removed)...
> With code I would like to change the print_area range to be the same as
> another range. Something like these three lines (though this doesn't

work):
>
> Dim r As Range
> Set r = range("myRange")
> Range("print_area") = r
>
> How do I do this?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show only Print_area range Gwen Microsoft Excel Programming 1 4th May 2006 07:47 AM
Macro to delete names except Print_Area barberboy@gmail.com Microsoft Excel Programming 6 15th Mar 2006 08:36 PM
Print_Area link problem Scott Microsoft Excel Programming 3 15th Oct 2004 11:15 AM
protect print_area? Steven Microsoft Excel Programming 1 22nd Apr 2004 11:32 PM
Print Ranges when Print_Area not set Dominic Robinson Microsoft Excel Programming 1 11th Sep 2003 09:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 AM.