+ Reply to Thread
Results 1 to 2 of 2

Macro debugs at "Application.CountA" with 45.000+ rows

  1. #1
    Registered User
    Join Date
    02-08-2007
    Location
    Denmark
    Posts
    17

    Macro debugs at "Application.CountA" with 45.000+ rows

    Hi

    I'm using this code (part of a larger macro) to count the rows with data.

    Set myRangeCopyA = Range("A54:A65536")
    Dim myCountCopyA As Integer
    myCountCopyA = Application.CountA(myRangeCopyA)

    The full macro works fine with dataextract counting 30.000- rows but it debugs at "myCountCopyA = Application.CountA(myRangeCopyA)"
    at data extract counting 45.000+ (haven't tried it with anything between those two amount of rows).

    Anyone knows a way to avoid that problem?

    Thanks,
    Kjaer

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Kjaer
    Hi

    I'm using this code (part of a larger macro) to count the rows with data.

    Set myRangeCopyA = Range("A54:A65536")
    Dim myCountCopyA As Integer
    myCountCopyA = Application.CountA(myRangeCopyA)

    The full macro works fine with dataextract counting 30.000- rows but it debugs at "myCountCopyA = Application.CountA(myRangeCopyA)"
    at data extract counting 45.000+ (haven't tried it with anything between those two amount of rows).

    Anyone knows a way to avoid that problem?

    Thanks,
    Kjaer
    Hi,

    'Integer' goes to 32,768

    try 'as Long'

    hth
    ---
    Si fractum non sit, noli id reficere.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1