Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Mpls, Minnesota, USA
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remember Print Range (Excel 97 SR2)

    I am creating a macro that will print a report summary (located at bottom of sheet). The report can be 1000 rows or it could be 1. The user may change the print range for the detailed report to show only what they want (maybe one months worth of data). If they want to print a summary, the macro would remember the current print area, reset the print area so the Summary prints, then set the print area back to what it was before changing it to the summary. I hope this is clear.
    Thanks,
    Chuck
    Chuck Reimer
    I'm from the Government and I'm here to help...

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Remember Print Range (Excel 97 SR2)

    How about doing something like this:

    <pre>Sub SavePrintArea()
    Dim sCurrPA As String
    With ActiveSheet.PageSetup
    sCurrPA = .PrintArea
    .PrintArea = ""
    ActiveSheet.PrintOut preview:=True
    .PrintArea = sCurrPA
    End With
    End Sub</pre>



    Steve

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Mpls, Minnesota, USA
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remember Print Range (Excel 97 SR2)

    Steve,

    Thanks for the fast reply. I will give it a go.

    Chuck
    Chuck Reimer
    I'm from the Government and I'm here to help...

  4. #4
    3 Star Lounger
    Join Date
    May 2002
    Location
    Mpls, Minnesota, USA
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remember Print Range (Excel 97 SR2)

    Steve,
    It worked like a charm, but then you knew it would.

    Thanks again,
    Chuck
    Chuck Reimer
    I'm from the Government and I'm here to help...

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Remember Print Range (Excel 97 SR2)

    Glad I could help.
    I only knew it would work to do what I "thought" you were asking for. I am never sure if they will work for the requestor really wants/needs... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Steve

Posting Permissions

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