View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
serge serge is offline
external usenet poster
 
Posts: 1
Default Finding the current date

Hi,

I'm using the following code to activate the current date in a column:

Private Sub workbook_activate()
Range("a:a").Cells.Find(what:=Date, LookIn:=xlFormulas, _
MatchCase:=False).Activate
End Sub

IF A1= 17/02/2004
A2= 18/02/2004
A3= 18/12/2004

Then it activates cell A2 which is good.
But if A1= 17/02/2004
A2= 18/12/2004
A3= 18/02/2004
then it activates cell A2.
What's wrong in this code?


---
Message posted from http://www.ExcelForum.com/