Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Runtime Error '6' Overflow error at row 32767

  1. #1
    Board Regular
    Join Date
    Mar 2003
    Posts
    130
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Runtime Error '6' Overflow error at row 32767

    Hello,

    I am running a macro that retrieves data from a DB. The entire table is only 35,045 rows. I am trying to retrieve all the rows from the table but for some reason when it hits row 32,768 rows it says 'Runtime Error 6: Overflow. All previous 32,767 rows are brought into the sheet fine.

    The sheet I am writing too is 'cleared' before the import.. anyone have any suggestions?

    leeloo

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Runtime Error '6' Overflow error at row 32767

    Change your "Integer" declaration to "Long".

    Is that a good guess without seeing any code?

  3. #3
    Board Regular
    Join Date
    Mar 2003
    Posts
    130
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Runtime Error '6' Overflow error at row 32767

    Awesome! Yep that was it, had my irow2 defined as a integer...
    thank you so much!

    leeloo

  4. #4
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Runtime Error '6' Overflow error at row 32767

    Sweet.

  5. #5
    New Member
    Join Date
    Jul 2008
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Runtime Error '6' Overflow error at row 32767

    I did that but now I get ByRef argument type mismatch

  6. #6
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    20,489
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    4 Thread(s)

    Default Re: Runtime Error '6' Overflow error at row 32767

    On what?

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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