I 've a function which will return a range object:
Dim temp as range
set temp = findit("abc")
Function Findit(Expr As String)
Dim col_head As Range
Set col_head = Cells.Find(What:=Expr, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
However , the problem is that after the function is excuted, there is error when returning to the line set temp = findit("abc").do anyone know what's the problem?thanks!