I have a problem currently where a macro runs that imports an Excel spreadsheet when the user clicks on a button. The problem is that not all the fields get imported to an already existing table. All the field names and data types are the same as in the Access table. I have tried this by converting the macro to VB and I still get the same issue, BUT if I import the spreadsheet manually via the menus -
File : Get external data : Import : select applicable file from the dialogue box

and then go through the various selection criteria including "has field names" all the data imports perfectly

Does anyone know why this is so and how to get around it?

Alternatively how can I create a VB script that allows the user to select the file via a command button?