Carry out task on range of csv files and leave untouched VBA

Hi,

Trying to write a script to carry out a number of tasks but is there code to enable an Excel to look in a particular file for the list of csv files - carry out the tasks and return the appropriate values in the Excel sheet whilst leaving the original csv files untouched?

Thanks in advance for your help.

Nick's picture

yes.. conceptually: 1. open

yes..

conceptually:

1. open the file containing the list
2. loop down the list
3. close the csv if open already (without saving changes)
4. open the csv files read-only
5. copy the data over + do your stuff
6. close the csv
7. close the file containing the list..