Subscript out of range

L

LHearn

I am having a hard time importing a spreadsheet from Excel to Access. It is
telling me that I have a "subscript out of range". I looked in the forums and
saw only older posts about it maybe being a bug in the demo version of Office
2007. Mine's not the demo version.

I get the same message when trying to import it as a csv file as well. Any
suggestions? I am a relatively new Access user.
 
B

boblarson

That error can occur for several reasons, but one major one is referring to a
worksheet that doesn't exist. So, if you had a worksheet named Sheet 1 and
you referred to it as Sheet1 it would give you that error.

It can also occur if a long datatype is attempted to be put into an integer
datatype if the long is greater than the number that integer will accept.

--
Bob Larson
Access MVP
Access World Forums Administrator
Utter Access VIP

Tutorials at http://www.btabdevelopment.com

__________________________________
 
R

Rick

Hi Bob,

I'm having the same problem, only both of the reasons you mentioned don't
apply. I even tried naming a range for import. Are there any other reasons
for this error to occur? Thanks, Rick
 
R

Rick

Never mind. I tried pasting the data and access told me the problem in the
Paste Errors table - not enough columns. Case of user error.
 
W

willy k

Hi Bob: We import a text file into an access table, then we import an excel
file into another access table. we get the "subscript out of range" error
message. we close access and open it then the excel file imports fine. any
ideas on a fix for this?

thanks
willy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top