View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt Connor Matt Connor is offline
external usenet poster
 
Posts: 3
Default VBA Replace Dates

Hi

I have an Excel worksheet which pulls data from SQL Server which treat null
dates as 01/01/1900

I'm trying to replace all such dates with blanks on the worksheet

In Excel when I go Edit Replace and enter Find What = 01/01/1900 leaving
Replace blank it works marvellously

However in VBA the following does not work (even though this was from
recording the above action)

Cells.Replace What:="01/01/1900", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

I have tried also using numerics for the What:= again with no luck

Am I being stupid?

Thanks

Matt