I've got some Excel Spreadsheets that I need to convert to text files. In
addition to the conversion, I'd like to retrieve the customer name for a
particular part number from our SQL Server database when I do the conversion.
I've written a VBA program that reads the rows in the spreadsheet, massages
the data as I need it to be massaged and then writes the data to a CSV file
for import into another application. What I'd like to know is, is there any
way that I take the part number from each row in the spreadsheet and then do
a lookup in a SQL Server database to get the customer for that part number.
In the VBA code, I'd have a variable that contains the part number and then
I'd have to do a select where the variable containing the part number equals
the part number in the database table. Is there any code on the net that
might show me how to get started? If it's any help, the database name is
oes, the table name is partmap and the field name for the part number is
qc_no and the field name for the customer is customer_no.
TIA
Ernie