Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using date as trigger for macro
I want to write a macro, that will look for today's date in a database, and
if it finds it, do another action. I have already designed the other action. Thanks! Mike |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using date as trigger for macro
Hi Mike,
I'm no expert at macros, but you could try: Worksheets(1).Range("a1") = "" 'dont forget to format cell a1 as the date that the other cell in your database is. Worksheets(1).Range("a1") = "=NOW()" 'where "worksheets(?).range("??").text" is the date somewhere in your database. 'I used b1 If Worksheets(1).Range("a1").Text = Worksheets(1).Range("b1").Text Then 'if same do something Worksheets(1).Range("c1").Value = "yep they're the same" Else 'if not do something else Worksheets(1).Range("c1").Value = "nope they're not" End If hth BigPig "Mike Milmoe" wrote: I want to write a macro, that will look for today's date in a database, and if it finds it, do another action. I have already designed the other action. Thanks! Mike |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using date as trigger for macro
Sub milmoe()
Set r = Range("A1:A100") For Each rr In r If rr.Value = DateValue(Now()) Then MsgBox ("call your macro here") End If Next End Sub -- Gary''s Student - gsnu200720 "Mike Milmoe" wrote: I want to write a macro, that will look for today's date in a database, and if it finds it, do another action. I have already designed the other action. Thanks! Mike |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using date as trigger for macro
This worked great. Thanks alot
Mike "Gary''s Student" wrote: Sub milmoe() Set r = Range("A1:A100") For Each rr In r If rr.Value = DateValue(Now()) Then MsgBox ("call your macro here") End If Next End Sub -- Gary''s Student - gsnu200720 "Mike Milmoe" wrote: I want to write a macro, that will look for today's date in a database, and if it finds it, do another action. I have already designed the other action. Thanks! Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I get a date in exel to trigger a reminder in 30 days? | Excel Discussion (Misc queries) | |||
macro trigger | Excel Discussion (Misc queries) | |||
trigger help | Excel Worksheet Functions | |||
trigger problem | Excel Discussion (Misc queries) | |||
Recurring annual events using a specific date as a trigger date | Excel Worksheet Functions |