Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Macro to Show (and Print) Only Named Range?

Hi, all!

I have a large sheet with many named ranges on it, which makes navigation through the sheet easy. Several users of the sheet (more powerful than myself), though, have said that they would find it less visually confusing if, in addition to going to the named range, they could:

A) Hide all rows and columns in the rest of the sheet, so that only the named range is visible, and

B) If they want, send only the named range (they always correspond to roughly letter-size areas) to a printer without having to set a print area and then go through the rest of the print routine.

I've been trying to use something like this to accomplish at least (A) [where "U1_RSA_Class_Checklist" is one of the named ranges]:

Sub GoToNamedZone()
Application.Goto Reference:="U1_RSA_Class_Checklist"
Range(Selection, Selection.End(xlToRight)).Select
Selection.EntireColumn.Hidden = False
End Sub

--which I know doesn't deal with rows yet, but I'm leery of actually selecting anything other than the named range, and it seems like there should be some way of going to the named range and then hiding all outside rows and columns in a less clunky way.

As far as the print issue goes, I'm still totally in the dark.

I could just use separate sheets with variously-set printing properties, but many of these ranges are part of a large table that breaking up in that way would just introduce new difficulties.

This is my first post here, and I hope I'm not just being dense and that this has been discussed thousands of times before and I'm just not finding it, but any help would be really, really, really appreciated!

Cheers!

Pausert
  #2   Report Post  
Junior Member
 
Posts: 18
Thumbs up

Quote:
Originally Posted by Pausert View Post
Hi, all!

I have a large sheet with many named ranges on it, which makes navigation through the sheet easy. Several users of the sheet (more powerful than myself), though, have said that they would find it less visually confusing if, in addition to going to the named range, they could:

A) Hide all rows and columns in the rest of the sheet, so that only the named range is visible, and

B) If they want, send only the named range (they always correspond to roughly letter-size areas) to a printer without having to set a print area and then go through the rest of the print routine.

I've been trying to use something like this to accomplish at least (A) [where "U1_RSA_Class_Checklist" is one of the named ranges]:

Sub GoToNamedZone()
Application.Goto Reference:="U1_RSA_Class_Checklist"
Range(Selection, Selection.End(xlToRight)).Select
Selection.EntireColumn.Hidden = False
End Sub

--which I know doesn't deal with rows yet, but I'm leery of actually selecting anything other than the named range, and it seems like there should be some way of going to the named range and then hiding all outside rows and columns in a less clunky way.

As far as the print issue goes, I'm still totally in the dark.

I could just use separate sheets with variously-set printing properties, but many of these ranges are part of a large table that breaking up in that way would just introduce new difficulties.

This is my first post here, and I hope I'm not just being dense and that this has been discussed thousands of times before and I'm just not finding it, but any help would be really, really, really appreciated!

Cheers!

Pausert

Hi,

Try this code,
Sub Testing ()
Application.Dialogs(xlDialogFormulaGoto).Show
ActiveSheet.PageSetup.PrintArea = Selection.Address
ActiveWindow.SelectedSheets.PrintPreview
End Sub

row 1 opens GoTo- Dialog where you can select the named range you want
row 2 sets PrintArea to correspond current selection
row 3 shows Print Prewiev - window, where you can select to print or not

Last edited by Sepeteus Jedermann : October 25th 10 at 06:17 PM Reason: Macros name must be somwthing else than PrintNamedRange
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
Print Named Cells highlights web link to Excel range ExcelMonkey Excel Discussion (Misc queries) 1 June 12th 08 11:46 PM
Using named range to extend print area for variable number of columns Pierre Excel Worksheet Functions 3 April 10th 08 05:51 PM
Excel2000:How to link Print Area with a named range Arvi Laanemets Excel Discussion (Misc queries) 5 April 8th 08 02:35 PM
Excel2000:How to link Print Area with a named range Arvi Laanemets Excel Worksheet Functions 5 April 8th 08 02:35 PM
Macro (Print) - Calling Named Ranges KGlennC Excel Discussion (Misc queries) 1 March 19th 05 09:20 PM


All times are GMT +1. The time now is 10:04 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"