+ Reply to Thread
Results 1 to 4 of 4

runtime error '6' overflow

  1. #1
    don
    Guest

    runtime error '6' overflow

    I get a runtime error in a routine that has run many times in the
    past.
    The difference is each month I have more data.
    the routine does a sort then stops at this line:

    finalrow=cells(rows.count,"a").end(xlup).row

    The answer should be 41236.
    If I comment out this line and simply put in

    finalrow=41236

    I still get the runtime error '6'

    If I put this line in a temp subroutine is runs fine.

    Not sure what to do next.

    Thanks for any help.

    Don

  2. #2
    keepITcool
    Guest

    Re: runtime error '6' overflow

    dim finalrow as long not as integer.




    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    don wrote :

    > I get a runtime error in a routine that has run many times in the
    > past.
    > The difference is each month I have more data.
    > the routine does a sort then stops at this line:
    >
    > finalrow=cells(rows.count,"a").end(xlup).row
    >
    > The answer should be 41236.
    > If I comment out this line and simply put in
    >
    > finalrow=41236
    >
    > I still get the runtime error '6'
    >
    > If I put this line in a temp subroutine is runs fine.
    >
    > Not sure what to do next.
    >
    > Thanks for any help.
    >
    > Don


  3. #3
    NickHK
    Guest

    Re: runtime error '6' overflow

    Don,
    How have you DIMmed "finalrow" ? As an Integer ?

    NickHK

    "don" <[email protected]> wrote in message
    news:[email protected]...
    > I get a runtime error in a routine that has run many times in the
    > past.
    > The difference is each month I have more data.
    > the routine does a sort then stops at this line:
    >
    > finalrow=cells(rows.count,"a").end(xlup).row
    >
    > The answer should be 41236.
    > If I comment out this line and simply put in
    >
    > finalrow=41236
    >
    > I still get the runtime error '6'
    >
    > If I put this line in a temp subroutine is runs fine.
    >
    > Not sure what to do next.
    >
    > Thanks for any help.
    >
    > Don




  4. #4
    don
    Guest

    Re: runtime error '6' overflow

    yes, I dimensioned it as an integer.
    I guess it needs to be dim as long

    Don

    On Tue, 26 Jul 2005 09:35:38 +0800, "NickHK" <[email protected]>
    wrote:

    >Don,
    >How have you DIMmed "finalrow" ? As an Integer ?
    >
    >NickHK
    >
    >"don" <[email protected]> wrote in message
    >news:[email protected]...
    >> I get a runtime error in a routine that has run many times in the
    >> past.
    >> The difference is each month I have more data.
    >> the routine does a sort then stops at this line:
    >>
    >> finalrow=cells(rows.count,"a").end(xlup).row
    >>
    >> The answer should be 41236.
    >> If I comment out this line and simply put in
    >>
    >> finalrow=41236
    >>
    >> I still get the runtime error '6'
    >>
    >> If I put this line in a temp subroutine is runs fine.
    >>
    >> Not sure what to do next.
    >>
    >> Thanks for any help.
    >>
    >> Don

    >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1