+ Reply to Thread
Results 1 to 4 of 4

worksheet.countif function from outside workbook

  1. #1
    Registered User
    Join Date
    09-20-2006
    Posts
    2

    worksheet.countif function from outside workbook

    hiyas all!

    currently, i am using code such as the following:

    Please Login or Register  to view this content.
    where str(i) is what i am trying to count


    what i want to do is replace the "Sheets("Serial Numbers).Range("A2:A6000")" portion to a hard location of a closed workbook on, say, the D: drive.

    for instance, the spreadsheet could be at: "D:\RM\SerialNumbers.xls" and wanting worksheet "Serial Numbers"

    is this possible? if so, is there an easy way to find code this? and am i even in the right thread?

  2. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    Either open the workbook (ReadOnly, if you want to make sure it doesn't get changed, or interfere with anyone else using it), or link to the closed workbook using an Excel4 macro. Unfortunately I can't remember how to do that off the top of my head, but if you can wait until I get to work in the morning (about 12 hours) I'll post you the link - unless someone beats me to it! I'm pretty sure the technique is well know, I just can't seem to find it...

    Col
    If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

  3. #3
    Registered User
    Join Date
    09-20-2006
    Posts
    2
    I dont suppose you (or anyone) could be more specific on the excel4 functions by any chance?

    thanks

    ~Eric H.

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi Eric,

    Take a look at Ron's solution

    http://www.rondebruin.nl/ado.htm

    HTH
    Cheers
    Carim

+ 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