Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Changing the print_area

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default Changing the print_area

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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Changing the print_area

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show only Print_area range Gwen[_3_] Excel Programming 1 May 4th 06 07:47 AM
Macro to delete names except Print_Area [email protected] Excel Programming 6 March 15th 06 08:36 PM
Print_Area link problem Scott Excel Programming 3 October 15th 04 11:15 AM
protect print_area? Steven Excel Programming 1 April 22nd 04 11:32 PM
Print Ranges when Print_Area not set Dominic Robinson Excel Programming 1 September 11th 03 09:38 AM


All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"