Beaner5434
Programmer
I am developing a VB6 app to process a number of Excel workbooks I receive every month. When I bind the workbook to a data control, however, it takes the first row of the Excel sheet as the Field name. Is there a way to get it to NOT do that (other than going in and manually inserting a new row with a dummy field name in cell A1)? The objective of the app is to automate the process w/o having to manually do anything to each file.
Here is the code I use to bind the Excel sheet to the data control ("xFile" containes the path and file to be processed):
Thanks for any guidance and help you can provide.
Here is the code I use to bind the Excel sheet to the data control ("xFile" containes the path and file to be processed):
Code:
dbLawson.DatabaseName = xFile
dbLawson.RecordSource = ""
dbLawson.Refresh
dbLawson.RecordSource = dbLawson.Database.TableDefs
(0).Name
dbLawson.Refresh
Thanks for any guidance and help you can provide.