Question, why would this work:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "import Table", "C:\Temp\somefile.xls", True
And this does not?
Dim Fpath As String
Dim Fname as string
Fname=”somefile.xls”
Fpath = "C:\Temp\" & fname
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "import Table", Fpath,True
The only difference is that I am using a variable for the file path.
I have a list of excel files I want to upload and append.
Will this never work- not designed to do it this way- or am I just doing something wrong?
Thanks for any help.
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "import Table", "C:\Temp\somefile.xls", True
And this does not?
Dim Fpath As String
Dim Fname as string
Fname=”somefile.xls”
Fpath = "C:\Temp\" & fname
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "import Table", Fpath,True
The only difference is that I am using a variable for the file path.
I have a list of excel files I want to upload and append.
Will this never work- not designed to do it this way- or am I just doing something wrong?
Thanks for any help.