I need to place some code in a button to import some .xls data into another .xls workbook. I searched the forum and found this code, posted by LegarColeman...
With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:Wo rkTest.csv", _ Destination:=Range("A1"))
.Name = "Test"
.FieldNames = True
I changed the file extension etc, but it doesn't seem to work for regular files.
The files that i need to import and count are a mixture of text and numbers (each column is the same data type), with an unknown amount of rows.
The filename of the file to import needs to come from a cell in the workbook.
Anyone have any other code to do this ?