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.
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.
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"
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.
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.
>
>
>
>
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.
>
>
>
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.
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks