F
FrigidDigit
Hi all,
I am using Ron de Bruin's code to extract cell values from workbooks via
ADO. It works perfectly apart from the fact that because I need to extract
several single, non-contigious cells, I need to call the GetData function 6
times for each work book. Is there any way to combine these 6 statements
into 1 or at least reduce them?
Any help would be appreciated.
FD
Call GetData(fname, SheetName, "A10:A10",
Sheets("Invoice Listing").Cells(eRow, 1), False)
Call GetData(fname, SheetName, "I11:I11",
Sheets("Invoice Listing").Cells(eRow, 2), False)
Call GetData(fname, SheetName, "I12:I12",
Sheets("Invoice Listing").Cells(eRow, 3), False)
Call GetData(fname, SheetName, "I13:I13",
Sheets("Invoice Listing").Cells(eRow, 4), False)
Call GetData(fname, SheetName, "I14:I14",
Sheets("Invoice Listing").Cells(eRow, 5), False)
Call GetData(fname, SheetName, "G65:G65",
Sheets("Invoice Listing").Cells(eRow, 6), False)
I am using Ron de Bruin's code to extract cell values from workbooks via
ADO. It works perfectly apart from the fact that because I need to extract
several single, non-contigious cells, I need to call the GetData function 6
times for each work book. Is there any way to combine these 6 statements
into 1 or at least reduce them?
Any help would be appreciated.
FD
Call GetData(fname, SheetName, "A10:A10",
Sheets("Invoice Listing").Cells(eRow, 1), False)
Call GetData(fname, SheetName, "I11:I11",
Sheets("Invoice Listing").Cells(eRow, 2), False)
Call GetData(fname, SheetName, "I12:I12",
Sheets("Invoice Listing").Cells(eRow, 3), False)
Call GetData(fname, SheetName, "I13:I13",
Sheets("Invoice Listing").Cells(eRow, 4), False)
Call GetData(fname, SheetName, "I14:I14",
Sheets("Invoice Listing").Cells(eRow, 5), False)
Call GetData(fname, SheetName, "G65:G65",
Sheets("Invoice Listing").Cells(eRow, 6), False)