View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Range .Count in Excel 2007

Harlan,

Actually the grid is 2^20 x 2^14, not 2^16.

Count is still a Long, but to accommodate this, Range has a new property,
CountLarge, which is type Variant.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Harlan Grove" wrote in message
oups.com...
I don't have XL2007 yet, but I've been thinking about how I might need
to rewrite code to cope with the new worksheet grid size. Since XL2007
has 2^20 rows and 2^16 columns, it has 2^36 cells per worksheet.
That's more than can be stored in a long integer (which can store only
up to 2^31-1). Has the return type for the .Count property of the
Range class become Double type, or will .Count property calls for
ranges with more than 2^31-1 cells throw errors or (this'd be fun!)
return incorrect long integer values, e.g., returning unsigned longs
from the underlying Excel OM implementation that would be interpreted
as negative signed integers by VBA?

I did search Google Groups, but I found nothing on this.