View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
BigPig BigPig is offline
external usenet poster
 
Posts: 77
Default 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