Results 1 to 20 of 42

Thread: 2007 compatibility

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    Quote Originally Posted by Oorang
    Does Worksheet.UsedRange.Rows.Count cause any issues?
    No it won't. It is unlikely that UsedRange would be all rows, and even if it were it would not be a problem as Count is a Long, so it caters for 1M+ rows easily.

    However, Worksheet.Cells.Count is a different matter. We are talking 17Billion+ cells here and that overflows Count significantly. Becuase of this, 2007 as an extra property, CountLarge, which returns the answer.

    Interestingly, type

    ?TypeName(Activesheet.Rows.Count)

    in the immediate window, and it tells you it is a long. Type

    ?TypeName(Activesheet.Cells.CountLarge)

    and you get a Compile Error.
    Last edited by Bob Phillips; 06-19-2008 at 10:28 AM.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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