Set xl=CreateObject("Excel.Application")
xl.Workbooks.Open "C:\Test.xlsx"
Set r = xl.Range("A1:N20").Find("kamesh")
If r Is Nothing Then
xl.Cells(1,1).Value= "not found"
Else
xl.Cells(1,1).Value= "found"
End If
xl.quit
set xl=nothing
xl.Workbooks.Open "C:\Test.xlsx"
Set r = xl.Range("A1:N20").Find("kamesh")
If r Is Nothing Then
xl.Cells(1,1).Value= "not found"
Else
xl.Cells(1,1).Value= "found"
End If
xl.quit
set xl=nothing
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.