+ Reply to Thread
Results 1 to 3 of 3

Row Count from a closed workbook

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,056

    Row Count from a closed workbook

    I'm having trouble with this piece of code. I'm getting an Overflow error. If I leave that part out, and don't delete row 1, everyting works. But I'd rather store the result as a value. I couldn't figure out how to do it using Worksheet.Function, so this is my workaround that's not working. I'd appreciate any help I can get. BTW I dimmed RowCt as an Integer.
    Please Login or Register  to view this content.
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,785

    Re: Row Count from a closed workbook

    If you assign a number to an Integer that is more than 32,767 you will get overflow. How many rows do you have in sheet PAC5G? Try changing to Long.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,056

    Re: Row Count from a closed workbook

    I hate it when my error is something I knew better than to do. 65K row. That was exactly the problem, and changing to LONG did the trick. Thanks so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. count if formula with link to closed workbook
    By steddas in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2019, 06:21 AM
  2. Replies: 4
    Last Post: 10-21-2016, 09:52 AM
  3. count rows in closed workbook without opening it
    By twozedz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-01-2016, 09:18 AM
  4. [SOLVED] Sum and Count Data from Closed Workbook
    By Lewster in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-05-2016, 03:01 PM
  5. Count with multiple criteria from a closed workbook
    By rcharity23 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-27-2014, 02:33 PM
  6. Replies: 5
    Last Post: 03-13-2012, 06:05 AM
  7. Using SUMPRODUCT to count values in closed workbook
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2012, 02:34 PM

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