Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Setting PrintArea by using Named Ranges

I'm a newbie and I'm having difficulty assigning a named range to a
print area.

Here's my attempt but its not working. It keeps on showing the entire
worksheet as the print area. I've tried many iterations of this concept
but can't seem to solve it. Any thoughts.


Dim rng As Range
Set rng = Range(Application.Names("WT_Souvenir_PrintRange"))
Application.Goto Reference:=rng

Application.StatusBar = "Beginning page setup"

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$6"
.PrintArea = rng
.CenterFooter = "Childhood Memories"
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = False
End With
ActiveWindow.SelectedSheets.PrintPreview
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting PrintArea by using Named Ranges

..PrintArea = rng.Address(external:=True)

--
Regards,
Tom Ogilvy


Oren Klaber wrote in message
...
I'm a newbie and I'm having difficulty assigning a named range to a
print area.

Here's my attempt but its not working. It keeps on showing the entire
worksheet as the print area. I've tried many iterations of this concept
but can't seem to solve it. Any thoughts.


Dim rng As Range
Set rng = Range(Application.Names("WT_Souvenir_PrintRange"))
Application.Goto Reference:=rng

Application.StatusBar = "Beginning page setup"

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$6"
.PrintArea = rng
.CenterFooter = "Childhood Memories"
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = False
End With
ActiveWindow.SelectedSheets.PrintPreview
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Setting PrintArea by using Named Ranges

Thanks Tom. That solved the problem.

Oren


"Tom Ogilvy" wrote in message ...
.PrintArea = rng.Address(external:=True)

--
Regards,
Tom Ogilvy


Oren Klaber wrote in message
...
I'm a newbie and I'm having difficulty assigning a named range to a
print area.

Here's my attempt but its not working. It keeps on showing the entire
worksheet as the print area. I've tried many iterations of this concept
but can't seem to solve it. Any thoughts.


Dim rng As Range
Set rng = Range(Application.Names("WT_Souvenir_PrintRange"))
Application.Goto Reference:=rng

Application.StatusBar = "Beginning page setup"

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$6"
.PrintArea = rng
.CenterFooter = "Childhood Memories"
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = False
End With
ActiveWindow.SelectedSheets.PrintPreview
End Sub

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
Named Ranges diaare Excel Worksheet Functions 0 August 24th 07 04:16 PM
Using named 3-D ranges Nick S. Excel Discussion (Misc queries) 1 March 22nd 07 11:26 AM
Named ranges [email protected] Excel Discussion (Misc queries) 1 March 21st 06 10:33 PM
Max # of named ranges leaftye - ExcelForums.com Excel Discussion (Misc queries) 1 July 14th 05 07:47 PM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM


All times are GMT +1. The time now is 01:30 PM.

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

About Us

"It's about Microsoft Excel"