Log in

View Full Version : subscript out of range



philfer
02-06-2010, 08:22 AM
Hi,

I am trying to import an excel file into an access table.

I have set up the fields and datatypes but when I try to import it it says subscript out of range which is not the most informative error message.

Does anyone know why this is happening?

Cheers
Phil

lucas
02-06-2010, 08:29 AM
I'm no expert in Access Phil but subscript out of range usually means that the code can't find something. It's looking for something that doesn't exist.

Check your filenames and sheetnames to make sure you didn't make a spelling error.

Simon Lloyd
02-06-2010, 12:56 PM
If i was a betting man i would say the error number given was 9, this would indicate that you are trying to call a sheet that doesn't exist, has a mis spelled name or perhaps has leading or trailing spaces in the name.

OBP
02-07-2010, 06:54 AM
There can be 2 other problems that might cause this, a missing Column or a change in the type of data in the column from waht is on the first line. Which Access uses to se the Field's data type.