"FIND" generates "Type mismatch" error
I have the following code, but it generates a type mismatch error. Also, I
need to allow for the event nothing is found. Can someone please show me how
to correct this?
Dim lngRow as Long
lngRow = ActiveSheet.UsedRange.Columns(23).Find(What:="A", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False, _
SearchFormat:=False).Row
Thanks much in advance.
|