Consulting

Results 1 to 5 of 5

Thread: subscript out of range

  1. #1
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    291
    Location

    subscript out of range

    Hello,

    When I try to import a sheet from Excel into an existing table I get a subscript out of range error.

    When I then import the sheet into a new table and then import it into the existing table I was trying above immediately afterwards it works fine

    What a mystery?!?!!?

    Anyone ever seen anything like this before

    Cheers

  2. #2
    VBAX Contributor
    Joined
    Oct 2011
    Location
    Concord, California
    Posts
    101
    Location
    Are there any invalid characters in the column headers? Could you attached sample of Excel file in question?

  3. #3
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    I know Access like I know the back of YOUR hand

    Are the Column Header labels identical to the Access Field names? if it makes a difference, but...
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  4. #4
    VBAX Contributor
    Joined
    Oct 2011
    Location
    Concord, California
    Posts
    101
    Location
    I've run into this problem before, and to the best of my recollection, it had to do with column headers; thus my question. It might be that there's a column without or a duplicate column header.

  5. #5
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    IIRC, you can name an Excel Range "Database",and use DB functions and methods on it and the labels are considered Field names.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •