Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to begin for a executable to lookup data in excel

Status
Not open for further replies.

dcorleto

MIS
May 19, 2002
82
US
I have an excel sheet with only two columns - one named Project and the other named Subcode. Is it possible to create an small application using VB to be able to search on either one of these two column headings? I would like to be able to put in part of either one or the other, and have it return everything that relates to the other column.

Sorry for the lameness of this, but I really don't know where else to start.
 
I recommend that you use ADO to open the excel file. With ADO, you should be able to treat the excel file like it is a table in a database, which should make doing lookups possible.

Start with
This web site will show you how to create a connection string for an excel file.

Then, you will need to add Micrsoft ActiveX Data Objects 2.x to your project. Create an ADO Connection Object, set the connection string, and open the connection. Then you should be able to do your lookups.


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
I'll post back on Monday and give you a class I have created that allows you to access data in an Excel file like a recordset (I have the code at work, not at home).

The class is only in beta at the moment, but it should do what you want.

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top