Thread: Find Question
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RaY RaY is offline
external usenet poster
 
Posts: 164
Default Find Question

I've tried using the following code to find a time stamp

Cells.Find(What:="21:30:00", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:=False, SearchFormat:=False).Activate

Which works to find the time 21:30:00. But the following does not work

Dim TimeMatch As Date
TimeMatch = Range("K6").Value
Cells.Find(What:=TimeMatch, After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:=False, SearchFormat:=False).Activate

Can anyone tell me why or what I'm doing wrong.

Thanks,
-Ray