+ Reply to Thread
Results 1 to 6 of 6

WorkbookAfterClose Event

  1. #1
    Spreadsheet Solutions
    Guest

    WorkbookAfterClose Event

    I know that this event does not excists, but I need one.
    Does anyone know how to create or mimick such an event.

    The reason is a bit complicated, but a hint in a good direction is
    nonetheless very much appreciated.




  2. #2
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500
    maybe have a workbook which opens that workbook and then put code in that once it closes to run another piece of code that you want to run in your "afterclose event"

  3. #3
    Jim Cone
    Guest

    Re: WorkbookAfterClose Event

    Workbook_Open ?
    --
    Jim Cone
    San Francisco, USA
    http://www.realezsites.com/bus/primitivesoftware


    "Spreadsheet Solutions" <[email protected]>
    wrote in message news:[email protected]...
    I know that this event does not exist, but I need one.
    Does anyone know how to create or mimick such an event.

    The reason is a bit complicated, but a hint in a good direction is
    nonetheless very much appreciated.




  4. #4
    Tom Ogilvy
    Guest

    RE: WorkbookAfterClose Event

    A workbook has to be open to run the code in it, so it couldn't invovle
    anything in the workbook being closed.

    If you instatiate Application Level events, then maybe the Windows Activate
    event or use Ontime in the Application level beforeclose event.

    --
    Regards,
    Tom Ogilvy


    "Spreadsheet Solutions" wrote:

    > I know that this event does not excists, but I need one.
    > Does anyone know how to create or mimick such an event.
    >
    > The reason is a bit complicated, but a hint in a good direction is
    > nonetheless very much appreciated.
    >
    >
    >
    >


  5. #5
    Bob Phillips
    Guest

    Re: WorkbookAfterClose Event

    Just use Ontime to fire a macro after it is closed. Chip has lots of detail
    at http://www.cpearson.com/excel/ontime.htm

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Spreadsheet Solutions" <[email protected]> wrote in message
    news:[email protected]...
    > I know that this event does not excists, but I need one.
    > Does anyone know how to create or mimick such an event.
    >
    > The reason is a bit complicated, but a hint in a good direction is
    > nonetheless very much appreciated.
    >
    >
    >




  6. #6
    Spreadsheet Solutions
    Guest

    Re: WorkbookAfterClose Event

    Guys or girls;

    I solved it.
    I used the Application.OnTime method to trigger the procedure that must run
    after the save.

    Why was this important.

    I have a workbook were different users have different views on that
    workbook.
    This means that not all of them can see all worksheets and that a user has
    to log on to create his specific view.

    When you close the workbook a self-created before close procedure runs to
    check for a yes/no save or cancel.
    If Yes the initial settings (one sheet visible) are restored before the book
    is saved.
    If No the book closes without save.
    This works fine as the workbook has not been saved before and these initial
    settings appear when a user opens the book again.
    The latter is what always must be the case; when you open the workbook, only
    the first sheet is visible.

    But; when a user saves the book and goes on editing the tricky thing
    appeared.
    When he then wants to close the workbook without saving the initial settings
    must be created again, but no editing may be saved.
    That contradicts.

    I realized that I can only create that situation when before saving the
    initial settings are created and immediatly after
    saving, the users specific settings are restored again.

    So; I solved it this way.
    Still, I'm eager to see if alternatives or better ways are available.

    Thanks for the help.

    ---
    Mark Rosenkrantz
    ---
    Spreadsheet Solutions
    Witkopeend 24
    1423 SN
    Uithoorn, Netherlands
    ---
    E: [email protected]
    W: www.rosenkrantz.nl


    "Spreadsheet Solutions" <[email protected]> wrote in message
    news:[email protected]...
    >I know that this event does not excists, but I need one.
    > Does anyone know how to create or mimick such an event.
    >
    > The reason is a bit complicated, but a hint in a good direction is
    > nonetheless very much appreciated.
    >
    >
    >




+ 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