Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 8
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  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default runtime error '6' overflow

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

NickHK

"don" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 8
Default 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"
wrote:

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

NickHK

"don" wrote in message
.. .
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
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
Overflow error.. why? Fingerjob Excel Discussion (Misc queries) 4 November 13th 06 05:18 PM
runtime error '6' overflow don Setting up and Configuration of Excel 1 July 26th 05 02:52 AM
Runtime Error 6 Overflow Wescotte Excel Programming 5 June 13th 05 11:59 PM
Overflow error Jim Berglund Excel Programming 3 January 30th 05 05:57 PM
Help! Overflow Error 6 Gauthier Excel Programming 6 September 24th 04 12:57 PM


All times are GMT +1. The time now is 09:30 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"