View Single Post
  #2   Report Post  
Sepeteus Jedermann Sepeteus Jedermann is offline
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