Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to import an Excel Spreadsheet on a daily basis

Status
Not open for further replies.

postlethwaited

Technical User
Apr 18, 2006
11
GB
Hi, I am gong to import an excel spreadsheet on a daily basis as per the instructions in thread181-946762. My problem is that the name of the spreadsheet changes on a daily basis - to include todays date - so the file is called c:xxxxddmmyy.csv.

Is there any way to adapt the code to account for this?

thanks
 
Use the macro to run code. You can then use a different name each time:
[tt]strFile = "C:\xxxx" & Format(Date,"ddmmyy") & ".csv"
DoCmd.Transferspreadsheet acImport, <...>, "tblTable", strFile[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top