ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Events, Class, Time Editing (https://www.excelbanter.com/excel-programming/312431-events-class-time-editing.html)

dave

Events, Class, Time Editing
 
Win 2k and xp
Excel 2k

Requirement: Want to track how much time I spend on each
workbook for edit time. Word has a builtin_document
parameter but excel does not.

Has anyone got some code/workbook that they are using.

If I have to build myself, a few questions.

per Chip's site

Window Activate/Deactivate does not trigger when switching
applications. To catch this I guess I would need to trap
the application activate/deactivate events.

So, if I'm working on book 1 and flip to Outlook, I need
to record on my sheet a "time stop" value, or if I flip to
another book within excel I also need to record time stop.

if I switch from outlook to excel book 2, will need to
record the time start for book2, and when going from book
2 to book 1 I need to record stop for book 2 and start for
book 1.


I'm struggling with the logic that I would use to record
to a tracking sheet. On book open I note time, on book
close, I record the close time---total edit time is the
difference less any time not within this book, or not
within excel app.

How should I set up monitoring of time not in this book or
not in the application.

If I were to set this up as a class event and wrote to
personal.xls each book and the time spent, is that the
best way to go about this.

TIA

Dave

Jim Rech

Events, Class, Time Editing
 
I seriously doubt you can do what you want from within Excel. I don't
believe there is any Excel application event, that is exposed to us, that
fires when Excel itself is activated or deactivated. The event you're
thinking of fires when workbook windows within Excel are
activated/deactivated.

Doesn't Outlook have some kind of tracking feature? The Journal feature. I
turned whatever it was off back in 1997 so I don't exactly remember what it
did but it might be what you want.

--
Jim Rech
Excel MVP
"Dave" wrote in message
...
| Win 2k and xp
| Excel 2k
|
| Requirement: Want to track how much time I spend on each
| workbook for edit time. Word has a builtin_document
| parameter but excel does not.
|
| Has anyone got some code/workbook that they are using.
|
| If I have to build myself, a few questions.
|
| per Chip's site
|
| Window Activate/Deactivate does not trigger when switching
| applications. To catch this I guess I would need to trap
| the application activate/deactivate events.
|
| So, if I'm working on book 1 and flip to Outlook, I need
| to record on my sheet a "time stop" value, or if I flip to
| another book within excel I also need to record time stop.
|
| if I switch from outlook to excel book 2, will need to
| record the time start for book2, and when going from book
| 2 to book 1 I need to record stop for book 2 and start for
| book 1.
|
|
| I'm struggling with the logic that I would use to record
| to a tracking sheet. On book open I note time, on book
| close, I record the close time---total edit time is the
| difference less any time not within this book, or not
| within excel app.
|
| How should I set up monitoring of time not in this book or
| not in the application.
|
| If I were to set this up as a class event and wrote to
| personal.xls each book and the time spent, is that the
| best way to go about this.
|
| TIA
|
| Dave




All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com