The name of the mastersheet into which all data is being copied is 'PB Data Sheet.xlsm'
These are the names of the 4 CSV files where, as before, the first part is the date that changes each day and the last part is the random number that changes each day:
1) 20120223.TEXSECPOS.GRPADELP.142744339.CSV
2) 20120223.TEXTDCASHB.GRPADELP.142744281.CSV
3) 20120223.Stock Loan Detail extract.GRPADELP.142733243.CSV
4) 20120223.Billing Summary extract.GRPADELP.142774677.CSV
The corresponding tabs in the mastersheet which each of the above files needs to be copied into in their entirity (i.e. it overwrites the data in each of the 4 tabs with fresh information each day) are:
1) TEXSECPOS
2) TEXTCASHB
3) STOCKLOANDETAIL(Extract)
4) Billing Summary extract
The code I have so far is below. A couple of problems with my code are:
1) When the macro opens the directory folder in Excel the folder only shows Excel files and not CSV files. I have to manually select 'show all' files to see the CSV files as well. Opening the folder through my desktop seems to solve this as it shows all files. I've tried to do this in the macro with the
but I can't get it to work.
2) Once the macro has opened one of the CSV files and copied the data it does not then close the window of the CSV sheet, rather it leaves it open. I'm not sure how to close the CSV window as it has a dynamic name.
Bookmarks