View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt Matt is offline
external usenet poster
 
Posts: 516
Default Searching for a Date

-Hello Everyone

I have a problem searching for a date. It works when I record it but not
when I run the code.

Sub FindDate

Cells.Find(What:="14/12/2005", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

End Sub

Running the macro above returns 'Object variable or With block variable not
set'
But if I end the code and do Shift+F4 to 'find again' Excel goes straight to
the cell?

Thanks for reading this far, and in advance for any help

Matt