Hi,
I have excel files from file1, file2, file3,........file10. I need a macro to import all the file. Is there any solutions for it?
Hi,
I have excel files from file1, file2, file3,........file10. I need a macro to import all the file. Is there any solutions for it?
I don't use macros, only VBA.
Are these files always the same names? Always 10 files?
In button Click event, maybe something like:
DoCmd.TransferSpreadsheet "file1" ...
...
DoCmd.TransferSpreadsheet "file10" ...
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Here is a link that should help you get started
http://www.accessmvp.com/kdsnell/EXCEL_Import.htm
You can do this by creating an Excel macro to dynamcially name all the ranges in each file, and use the named range in the TransferSpreadsheet command. For more information, check this link: http://www.mrexcel.com/forum/microso...file-path.html