+ Reply to Thread
Results 1 to 5 of 5

Pull values from each .xls file in dir

  1. #1
    Registered User
    Join Date
    04-15-2004
    Posts
    3

    Pull values from each .xls file in dir

    I have a directory of X amount of .xls files. They are all in the same format, just different numbers. I would simply like to use a bit of code to scan through every file and copy 2 different cells into one line of a .txt file. The results would be like:

    139 $1,000.00
    244 $3,235.54
    456 $ 896.66
    .
    .
    .

    I need all the help you can give
    Thanks!

  2. #2
    Jim Cone
    Guest

    Re: Pull values from each .xls file in dir

    Ron de Bruin has various ways to do that at ...
    http://www.rondebruin.nl/ado.htm
    --
    Jim Cone
    San Francisco, USA
    http://www.realezsites.com/bus/primitivesoftware


    "Duke17" wrote in message
    I have a directory of X amount of .xls files.
    They are all in the same format, just different numbers.
    I would simply like to use a bit of code to scan through
    every file and copy 2 different cells into one line of a .txt file.
    The results would be like:

    139 $1,000.00
    244 $3,235.54
    456 $ 896.66

  3. #3
    Registered User
    Join Date
    04-15-2004
    Posts
    3
    Jim, thanks for directing me to that link, it's been very helpful. There's one thing I'm having trouble with, though. I need to "set a reference to the Microsoft ActiveX Data Objects 2.5 library in the VBA editor." I'm not sure how to do this...can you please help?

    Thanks!

  4. #4
    Jim Cone
    Guest

    Re: Pull values from each .xls file in dir

    In the VBE , (that's the place that you write your code), go to the
    menu bar and select: Tools | References.
    In the drop down list, find and checkmark the library name.
    I have several versions of the ...Data Objects library listed.
    It's probably best to checkmark the latest version.
    --
    Jim Cone
    San Francisco, USA
    http://www.officeletter.com/blink/specialsort.html


    "Duke17" wrote in message
    Jim, thanks for directing me to that link, it's been very helpful.
    There's one thing I'm having trouble with, though. I need to "set a
    reference to the Microsoft ActiveX Data Objects 2.5 library in the VBA
    editor." I'm not sure how to do this...can you please help?
    Thanks!
    --
    Duke17


  5. #5
    Registered User
    Join Date
    04-15-2004
    Posts
    3
    Thanks for your help, I included the reference like you suggested and it works just fine now.

    Take care,
    Brian

+ 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