I have the following code that transfers data from an excel file into a table in Access. What I would like to do is edit the code so that the user can select which Excel file to transfer from. Data changes from year to year and copies of the same file are saved in different locations based upon the year.
Thanks,
TNEMOM
Code:
Option Compare Database
Private Sub Command0_Click()
strTableName = InputBox("Enter table name:", "TABLE NAME")
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, strTableName, "O:\PWM_Shared_Files\Stations Estimates\Sent Complete Estimates\2008\Zones more than one\2008 PM Unit Prices\2008 UnitPrices June 20 07.xls", True
End Sub
Thanks,
TNEMOM