View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default type mismatch on find function


i missed off the last closed bracket

SET rResult = Range("a:a").Find(What:="abc", After:=Range("A44") )

FIND returns a range object, hence the DIM as Range and we sue SET to assign
the found object to it.



"Patrick Molloy" wrote in message
...
Dim rResult As Range
SET rResult = Range("a:a").Find(What:="abc", After:=Range("A44") )



"Patrick Molloy" wrote in message
...
Dim rResult As Range
SET rResult = Range("a:a").Find( etc etc

"Scooter" wrote in message
...
I am getting a type mismatch on this

Dim intResult As Integer
intResult = Range("a:a").Find(What:="abc", After:="A44",
LookIn:=xlValues,_
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext,_
MatchCase:=False, SearchFormat:=False).Row

I have also tried
intResult = Cells.Find(What:="abc", After:="A44", ...).Row
intResult = Selection.Find(What:="abc", After:="A44", ...).Row