ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Comparing current time to a particular cell (https://www.excelbanter.com/excel-programming/364896-comparing-current-time-particular-cell.html)

[email protected]

Comparing current time to a particular cell
 
I am trying to generate a reminder for our laboratory analyst to
perform a certain task with our samples at a particular time. The time
at which she needs to do this task (end time) will be in a particular
cell. This end time is based on the addition of 2 hours to another
cell that contains the start time.

So I would like to add the current time to a different cell and have it
be frequently updated using the computer's clock. This will give me
something to which I can compare the time described above. I need this
same event to occur over multiple worksheets but only happen on the one
being currently used.

Thanks so much for any help that anyone can provide!


arno

Comparing current time to a particular cell
 
Hi,
it be frequently updated using the computer's clock.


sorry, this will not work. It is possible to remind you, however, this
would be a macro running permanently - it would be impossible to work
with excel anymore, this is normal when a macro is running.

I would suggest that you think about creating a scheduled task or
preferrably an entry into outlook calendar when the user enters the
data. The only thing have to know is how to create a scheduled task
with a commandline/batchfile or how to create a meeting in outlook with
Visual Basic for Excel ;)

arno


arno

Comparing current time to a particular cell
 
Here's a macro to create an outlook appointment:

Sub test()
Set myOlApp = CreateObject("Outlook.Application")

Set myItem = myOlApp.CreateItem(1) '(olAppointmentItem)
''This appears to be an Excel bug, using "1" works fine

myItem.MeetingStatus = olMeeting
myItem.Subject = "Do something"
myItem.Location = "Lab XY"
myItem.Start = #6/21/2006 3:30:00 PM#
myItem.Duration = 5
myItem.Save
MsgBox "done"
End Sub

you can find further details in OUTLOOK VBA Help on "AppointmentItem".

arno

[email protected]

Comparing current time to a particular cell
 
Thanks SO much for replying so quickly. I have been so busy figuring
out other things that I haven't had a chance to look back here
recently. From further research I was beginning to assume what you
said - that what I was trying to do was not possible just in Excel. I
may try to use the code you offered for making an Outlook appointment.
GREATLY appreciated.

Angie



All times are GMT +1. The time now is 02:45 PM.

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