Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Duke17
 
Posts: n/a
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Cone
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Duke17
 
Posts: n/a
Default Pull values from each .xls file in dir


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
------------------------------------------------------------------------
Duke17's Profile: http://www.excelforum.com/member.php...fo&userid=8361
View this thread: http://www.excelforum.com/showthread...hreadid=546205

  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim Cone
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Duke17
 
Posts: n/a
Default Pull values from each .xls file in dir


Thanks for your help, I included the reference like you suggested and it
works just fine now.

Take care,
Brian


--
Duke17
------------------------------------------------------------------------
Duke17's Profile: http://www.excelforum.com/member.php...fo&userid=8361
View this thread: http://www.excelforum.com/showthread...hreadid=546205

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Outlook Attachments opening after several errors everytime cito_support Setting up and Configuration of Excel 2 March 13th 06 06:15 PM
Recover .xls file with "Too many different cell formats" error Saum Excel Discussion (Misc queries) 1 September 17th 05 06:45 PM
clicking .XLS file opens Excel 2003 but doesn't find the file Arrow Computer Excel Discussion (Misc queries) 2 August 10th 05 03:51 AM
.CSV File into .XLS file acyakos Excel Discussion (Misc queries) 5 April 7th 05 12:50 PM
Problem viewing existing .XLS file Arthur,JR Excel Discussion (Misc queries) 1 January 9th 05 01:03 AM


All times are GMT +1. The time now is 12:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"