What I am trying to do is search an excel document and bring back all results that matches my search critera.
On a VB form I have a text box and a flexgrid.
I want it to search for the text within my text box, and when it finds a match bring it into my flexgrid. (There maybe more than one result).
I am using VB6 and have managed to coble together this code so far, but it just does not seem to work:
Dim xlObject As Excel.Application
Dim xlWB As Excel.Workbook
Set xlObject = New Excel.Application
Set xlWB = xlObject.Workbooks.Open("D:\test.xls")
.Cells.Find(What:=txtDate.Text, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
If anyone has any ideas please let me know as i am a bit stumped.