C
Clemens
Hi,
Each week I perform an import from an excel sheet to my access table.
First I clear the table and then I'm performing the import manual.
Now I want to automate this step and following code I recieved:
DoCmd.RunSQL "DELETE * FROM Table"
DoCmd.TransferSpreadsheet acImport, , "Table", "c:\spreadsheet.xls".
This works for me, but the excel file location is fixed. How can this code
be change when pressing button I have to select the file I want to import?
This option is needed, because other users gives the file a different name
or location and for them it also needs to work
Each week I perform an import from an excel sheet to my access table.
First I clear the table and then I'm performing the import manual.
Now I want to automate this step and following code I recieved:
DoCmd.RunSQL "DELETE * FROM Table"
DoCmd.TransferSpreadsheet acImport, , "Table", "c:\spreadsheet.xls".
This works for me, but the excel file location is fixed. How can this code
be change when pressing button I have to select the file I want to import?
This option is needed, because other users gives the file a different name
or location and for them it also needs to work