Thread: Find
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Find

Hello,

I currently use the standard vba code to find specific
cells (data, words) within a spreadsheet.

Selection.Find(What:="NEW1", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

My problem is when the information is not in the
spreadsheet I get an error. How could I rephrase my code
not give me an error if the information is not in the
sheet (in this case the wording "NEW1" is not in the
sheet.)


Thank You,