Hi Radoslav,
The code works wonderfully although there were two very slight syntax errors. Fixed version is below. Namely, I changed all instances of sRange to Range & changed FindValue to Value. Cheers.
Inputs: [handle] as number, [Workbook], [Worksheet], [Range], [Value] - all as text
Outputs: [CellRef], [Message] - both as text
Code:
Dim excel, sheet As Object
Try
sheet = GetWorksheet(Handle, Workbook, Worksheet)
excel = sheet.Application
If Range="""" Then
Message = ""No Range provided""
Else
sheet.Activate
sheet.Range(Range).Find(What:=Value, LookIn:= _
-4163, LookAt:=1, SearchOrder:=1, SearchDirection:= _
1, MatchCase:=False, SearchFormat:=False).Activate
CellRef = excel.ActiveCell.Address
End If
Catch e As Exception
Message = e.Message
Finally
excel = Nothing
sheet = Nothing
End Try