What does it mean when it say subscript out of range

S

Shargory

I am in the process of importing excel into Access and I keep getting this
message that states subscript is out of range.
 
K

Ken Snell \(MVP\)

This message is a "generic" one that indicates that the argument being
supplied to a subroutine or function is "out of the range" that the function
or subroutine expects or that it can find (e.g., suppose you have one form
open, and your programming tells ACCESS to open the second form in the
collection -- because there is no second form, you'd get this error
message).

You don't say how you're importing the file -- are you using File | Get
External Data | Import menu? Or are you using a macro (TransferSpreadsheet
action)? or VBA code (DoCmd.TransferSpreadsheet method)?
 
S

Shargory

I am actually transferring a excel worksheet file into access. I tranferred
3 worksheet from the same workbook but the 2 are giving me the subscript is
out of range.
 
S

Shargory

I am actually importing an excel worksheet into access. I have imported 3
worksheet from the same workbook so far but have been getting this message
with the two of them.
 
S

Shargory

I am importing from access External data.

Ken Snell (MVP) said:
This message is a "generic" one that indicates that the argument being
supplied to a subroutine or function is "out of the range" that the function
or subroutine expects or that it can find (e.g., suppose you have one form
open, and your programming tells ACCESS to open the second form in the
collection -- because there is no second form, you'd get this error
message).

You don't say how you're importing the file -- are you using File | Get
External Data | Import menu? Or are you using a macro (TransferSpreadsheet
action)? or VBA code (DoCmd.TransferSpreadsheet method)?
 
K

Ken Snell \(MVP\)

What is the path and filename for the EXCEL file? What is the name of the
worksheets in that file that are not importing?
 
P

Pete D.

Are you importing a named range in the spreadsheet? If the named range
includes blanks you can get this. Pete D.
 
A

Andri

i do experience for "subscript out of range", when importing Excel to Access.
in my case, i did the followings:
1. the Field name should be the same as in both Excel and Access.
2. for the ID (Autonumber in Access) should be filled manual in Excel also.
3. Cell format both in Access and Excel should be the same.
HTH.
 
S

saima

jhhkhhkhk
Andri said:
i do experience for "subscript out of range", when importing Excel to Access.
in my case, i did the followings:
1. the Field name should be the same as in both Excel and Access.
2. for the ID (Autonumber in Access) should be filled manual in Excel also.
3. Cell format both in Access and Excel should be the same.
HTH.
 

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