C
Chad
Is there a way to import data (in VBA) from an Excel file
making the data on each worksheet become a table?
Example:
I have an Excel file that has 3 worksheets named Table1,
Table2, and Table3 for example's sake. The name of the
Excel file is backup.xls.
In my Access data base I have a function set up with the
code:
DoCmd.TransferSpreadsheet transfertype:=acImport, _
spreadsheettype:=acSpreadsheetTypeExcel9, _
tableName:="Table1", _
FileName:="F:\Desktop\backup.xls", _
hasfieldnames:=True
This code imports the data from the 1st worksheet into a
table named Table1 but I am not sure how to import the
data from the other worksheets within the file as Table2
and Table3 respectively.
Any help would be greatly appreciated.
Thanks,
Chad
making the data on each worksheet become a table?
Example:
I have an Excel file that has 3 worksheets named Table1,
Table2, and Table3 for example's sake. The name of the
Excel file is backup.xls.
In my Access data base I have a function set up with the
code:
DoCmd.TransferSpreadsheet transfertype:=acImport, _
spreadsheettype:=acSpreadsheetTypeExcel9, _
tableName:="Table1", _
FileName:="F:\Desktop\backup.xls", _
hasfieldnames:=True
This code imports the data from the 1st worksheet into a
table named Table1 but I am not sure how to import the
data from the other worksheets within the file as Table2
and Table3 respectively.
Any help would be greatly appreciated.
Thanks,
Chad