Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jun 2005
    Posts
    386
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Can you set up a print job and insert a named range to print instead of cell parameters? If so, how does one do this?

    Thanks

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could choose the name from the drop down and then go to File / Print... and choose Selection.
    The following macro will ask for the name of the range and then print that named range.


    Code:
    Sub printNamed()
    	Application.Goto _
    	Reference:=Application.InputBox("Named Range", "Range name please")
    	Selection.PrintOut Copies:=1, Collate:=True
    End Sub

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    In VBA, you can use

    ActiveSheet.Range("Test").PrintOut

    or if you want to let the user specify a name:

    Dim strName As String
    Dim rng As Range
    strName = InputBox("Which named range do you want to print?")
    On Error Resume Next
    Set rng = ActiveWorkbook.Names(strName).RefersToRange
    If Not rng Is Nothing Then
    rng.PrintOut
    End If

  4. #4
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    New York, New York, USA
    Posts
    266
    Thanks
    0
    Thanked 19 Times in 19 Posts
    You can also

    1. Create a name for the range of cells

    2. Go to Page Setup

    3. Select the Sheet Tab

    4. In the Print Area Box Enter the Name

    5. Select OK.


    If you want to Print more than one range that you have named

    It item 4 above Enter the first Name then a comma then the Second Name
    Examplte PrAA,PrBB

    Regards,

    Tom Duthie

  5. #5
    3 Star Lounger
    Join Date
    Jun 2005
    Posts
    386
    Thanks
    3
    Thanked 0 Times in 0 Posts
    thank you. I will give it a shot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •