Hi, I'm trying to automatically import an excel spreadsheet into Access using the following code.
Problem is I keep getting the error "Runtime error 3274, external table is not in the expected format". I have Excel and Access 2003. The import works fine when I do it manually. I assume it is because I am specifying the wrong spreadhseet type but I have tried all the options (I think) and can't get any to work. If anyone can advise that would be great.
Thanks, Robyn
Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "tblTabs", "C:\Rpt_pjwk_post.xls", True
Problem is I keep getting the error "Runtime error 3274, external table is not in the expected format". I have Excel and Access 2003. The import works fine when I do it manually. I assume it is because I am specifying the wrong spreadhseet type but I have tried all the options (I think) and can't get any to work. If anyone can advise that would be great.
Thanks, Robyn