PDA

View Full Version : copy data from other sheets into another sheet



Riaaz66
07-08-2010, 07:02 AM
Hi,

In a Workbook I have Sheet1 and Sheet2.
Sheet1 needs to be filled by data from another Excelsheet with every day another filename (example: File1_[date].xls -> dateformat is yyyymmdd)
The range is always column A to M that needs to be copies to Sheet1.

The same goes exact for Sheet2, with the difference that data that needs to be copied is from an XML sheet and the range is always column A to AM. Here also the file name has a different name every day due to the fact that it contains a date in the name.


In the (empty)example sheet there is a macro called GetDataFromClosedWorkbook() which I got from the KBase section. I tried to adjust it manually but actually don't know how to start.
I want to have the macro ask me where to get File1. And when I open File1, column A to M needs to be copied to Sheet1 and then File1 has to close.

Can somebody help me on this?

Please find attached the code.