Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
don
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default

Did you use:

Dim FinalRow as Integer

If yes, change it to:
dim finalrow as long

Integers can only go up to 32767.



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


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error '800a9c64' Dimple Wathen Excel Discussion (Misc queries) 0 July 14th 05 07:29 PM
Runtime error for macro that works in workbook created in Crystal Excel Discussion (Misc queries) 1 June 22nd 05 08:43 PM
Overflow Error DG Excel Discussion (Misc queries) 3 April 15th 05 05:45 PM
Excel help giving runtime error Hari Prasadh Excel Discussion (Misc queries) 1 January 21st 05 01:23 PM
Why do I get the runtime error message430 when I start my compute. Thorcat Setting up and Configuration of Excel 1 December 2nd 04 07:15 PM


All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"