I am using the below code to find the search, if value not found, am getting an error.
But wat I require is, watever the string am searching for, if its there the only string has to be extracted from the whole string.
please help
Function FindText(SearchString As String)
' Dim cl As Range
' Dim ws As Worksheet
'' Workbooks("cosmos access thru vba.xlsm").Sheets(5).Activate
' 'Sheets("calcSheet").Activate
'
' Set ws = Worksheets("Sheet2")
' ActiveSheet.Range("A1").Select
' Application.FindFormat.Clear
'
'' Find first instance on sheet
''On Error GoTo Handler:
'
' Set cl = ws.Cells.Find(What:=SearchString, After:=ws.Cells(1, 1), _
' LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
' SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
' cl.Activate
End Function