Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
yes, charles, that's exactly what i saw happening and discovered this was a
way of getting it to work correctly. -- Gary Keramidas Excel 2003 "Charles Williams" wrote in message ... Hi Gary, Here is one possible explanation: Its possible to have both a compatibility workbook (65K rows) and a non-compatibility workbook (million rows) open at the same time. If you dont fully qualify the row count (as in ws3.Cells(Rows.Count, "A") then its possible that the active sheet referred to by Rows.count will have a million rows but that ws3 will only have 65K. I was caught by this kind of problem in 2007 and spent some time puzzling about it before I realised what was happening. regards Charles never really used 2007, so i'm wondering if you've seen this behavior in 2010, or 2007, for that matter. typically, in 2003, ws3.Cells(Rows.Count, "A").End(xlUp).Row, would return the last row but, in 2010, i frequently get debugs on this line when opening a 2003 workbook in compatibility mode. so, i've resorted to change the code to this and it seems to resolve the issue: ws3.Cells(ws3.Rows.Count, "A").End(xlUp).Row seems excel is sometimes thinking it has a million rows, when in fact there are only 65000, so it debugs. seems to happen when i open another workbook with code. anyone seen this or have a better way? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2010 | Excel Discussion (Misc queries) | |||
Excel 2010 | Excel Discussion (Misc queries) | |||
Form 4 Range of time from 1/20/2010 4:00 AM To 1/21/2010 10:00 AM | Excel Worksheet Functions | |||
Can't open workbook in excel 64 bit 2010 - but can in excel 2010 3 | Excel Programming |