+ Reply to Thread
Results 1 to 5 of 5

After Print event

  1. #1
    Guest

    After Print event

    I used BeforePrint event to activate multiple sheets in a
    document, so every time someone tries to print, all pages
    are included.
    After the print job is done, I want Sheet1 to be the only
    active sheet. In other words, I want the activesheets to
    go from multiple sheets to one sheet, but since there is
    no AfterPrint event, I am not sure how to handle this.

    Thanks.

  2. #2
    Dave Peterson
    Guest

    Re: After Print event

    You can use application.ontime to call another routine after a little bit.

    Option Explicit
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    'your print routine
    Worksheets.Select '??

    Application.OnTime Now + TimeSerial(0, 0, 3), "AfterPrint"
    End Sub

    And in a general module:
    Option Explicit
    Sub AfterPrint()
    Worksheets("Sheet1").Select
    End Sub

    Chip Pearson explains ontime at:
    http://www.cpearson.com/excel/ontime.htm

    [email protected] wrote:
    >
    > I used BeforePrint event to activate multiple sheets in a
    > document, so every time someone tries to print, all pages
    > are included.
    > After the print job is done, I want Sheet1 to be the only
    > active sheet. In other words, I want the activesheets to
    > go from multiple sheets to one sheet, but since there is
    > no AfterPrint event, I am not sure how to handle this.
    >
    > Thanks.


    --

    Dave Peterson

  3. #3
    Bob Phillips
    Guest

    Re: After Print event

    Have you tried to simply activate one sheet after the printout statement in
    that event?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    <[email protected]> wrote in message
    news:[email protected]...
    > I used BeforePrint event to activate multiple sheets in a
    > document, so every time someone tries to print, all pages
    > are included.
    > After the print job is done, I want Sheet1 to be the only
    > active sheet. In other words, I want the activesheets to
    > go from multiple sheets to one sheet, but since there is
    > no AfterPrint event, I am not sure how to handle this.
    >
    > Thanks.




  4. #4
    Tom Ogilvy
    Guest

    Re: After Print event

    Seems a little flaky.

    Why not just
    disable events
    print the sheets
    cancel the print triggering the beforeprint
    ' select a single sheet if selection was used to print
    enable events.

    --
    Regards,
    Tom Ogilvy



    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > You can use application.ontime to call another routine after a little bit.
    >
    > Option Explicit
    > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > 'your print routine
    > Worksheets.Select '??
    >
    > Application.OnTime Now + TimeSerial(0, 0, 3), "AfterPrint"
    > End Sub
    >
    > And in a general module:
    > Option Explicit
    > Sub AfterPrint()
    > Worksheets("Sheet1").Select
    > End Sub
    >
    > Chip Pearson explains ontime at:
    > http://www.cpearson.com/excel/ontime.htm
    >
    > [email protected] wrote:
    > >
    > > I used BeforePrint event to activate multiple sheets in a
    > > document, so every time someone tries to print, all pages
    > > are included.
    > > After the print job is done, I want Sheet1 to be the only
    > > active sheet. In other words, I want the activesheets to
    > > go from multiple sheets to one sheet, but since there is
    > > no AfterPrint event, I am not sure how to handle this.
    > >
    > > Thanks.

    >
    > --
    >
    > Dave Peterson




  5. #5
    Dave Peterson
    Guest

    Re: After Print event

    That's an alternative, too <bg>.



    Tom Ogilvy wrote:
    >
    > Seems a little flaky.
    >
    > Why not just
    > disable events
    > print the sheets
    > cancel the print triggering the beforeprint
    > ' select a single sheet if selection was used to print
    > enable events.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    > > You can use application.ontime to call another routine after a little bit.
    > >
    > > Option Explicit
    > > Private Sub Workbook_BeforePrint(Cancel As Boolean)
    > > 'your print routine
    > > Worksheets.Select '??
    > >
    > > Application.OnTime Now + TimeSerial(0, 0, 3), "AfterPrint"
    > > End Sub
    > >
    > > And in a general module:
    > > Option Explicit
    > > Sub AfterPrint()
    > > Worksheets("Sheet1").Select
    > > End Sub
    > >
    > > Chip Pearson explains ontime at:
    > > http://www.cpearson.com/excel/ontime.htm
    > >
    > > [email protected] wrote:
    > > >
    > > > I used BeforePrint event to activate multiple sheets in a
    > > > document, so every time someone tries to print, all pages
    > > > are included.
    > > > After the print job is done, I want Sheet1 to be the only
    > > > active sheet. In other words, I want the activesheets to
    > > > go from multiple sheets to one sheet, but since there is
    > > > no AfterPrint event, I am not sure how to handle this.
    > > >
    > > > Thanks.

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1