ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Timing Multiple Events (https://www.excelbanter.com/excel-programming/418872-timing-multiple-events.html)

AussieDave

Timing Multiple Events
 
I am using the worksheet as a database to record System Problems. One
hour after the "Resolved" column has been completed that row is to be
deleted. This will apply to all rows in the worksheet, therefore rows
displayed will only be those not yet resolved plus those resolved in
the last hour.

I need some ideas as to how I can maintain a timer for each row that
has been resolved.

All help appreciated, Dave

joel

Timing Multiple Events
 
You need to add a time to each row. I assume the rows are getting updated by
a query that is being refreshed automatically at a fixed time period. You
can use a refresh query event (see vba help AfterRefresh Event) to add the
time when the row was added. The query event can also remove expired lines.
The is also a BefroeRefresh Event that you can use to remove expired rows.

Also look at the VBA help for the ONTIME method. You can write a subroutine
which runs every 15 minutes (or as required) by uing the ONTIME method.
Inside the subroutine you can use ONTIME to have the subroutine called again
15 minutes later. You can also call you subroutine the first time from a
workbook open event.

"AussieDave" wrote:

I am using the worksheet as a database to record System Problems. One
hour after the "Resolved" column has been completed that row is to be
deleted. This will apply to all rows in the worksheet, therefore rows
displayed will only be those not yet resolved plus those resolved in
the last hour.

I need some ideas as to how I can maintain a timer for each row that
has been resolved.

All help appreciated, Dave


AussieDave

Timing Multiple Events
 
Thanks a million Joel.
Actually the data is being entered manually, not via a query.
However, the ONTIME method works perfectly.
Thanks again, Dave

On Oct 22, 4:59*pm, Joel wrote:
You need to add a time to each row. *I assume the rows are getting updated by
a query that is being refreshed automatically at a fixed time period. *You
can use a refresh query event (see vba help AfterRefresh Event) to add the
time when the row was added. *The query event can also remove expired lines. *
The is also a BefroeRefresh Event that you can use to remove expired rows..

Also look at the VBA help for the ONTIME method. *You can write a subroutine
which runs every 15 minutes (or as required) by uing the ONTIME method. *
Inside the subroutine you can use ONTIME to have the subroutine called again
15 minutes later. *You can also call you subroutine the first time from a
workbook open event.



"AussieDave" wrote:
I am using the worksheet as a database to record System Problems. *One
hour after the "Resolved" column has been completed that row is to be
deleted. *This will apply to all rows in the worksheet, therefore rows
displayed will only be those not yet resolved plus those resolved in
the last hour.


I need some ideas as to how I can maintain a timer for each row that
has been resolved.


All help appreciated, Dave- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 04:20 AM.

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