stephenmbell
IS-IT--Management
I have 25 excel sheets that I dynamically create by exporting data from Access.
Each of the 25 files consist of 1 sheet each (sheet 2 and 3 exists, but contain no data and do not concern me)
Using VBA I would like to:
- Create a new workbook (AllData.xls) (I have this part done)
For Each of the 25 files
copy worksheet1
and paste worksheet1 into alldata.xls (into a new worksheet)
So that at the end of this code I will have the original 25 files and a new file that contains 25 worksheets or tabs, containing the data that is in the 25 files.
So far I can loop through all of the files, open them, and access their data.
I am having trouble with the actual copy / paste.
I have been toying with worksheet.copy and worksheet.paste methods, but I cannot seem to get it to work.
Hope this post is straight forward enough.
Any help is greatly appreciated.
Thanks
sb
Each of the 25 files consist of 1 sheet each (sheet 2 and 3 exists, but contain no data and do not concern me)
Using VBA I would like to:
- Create a new workbook (AllData.xls) (I have this part done)
For Each of the 25 files
copy worksheet1
and paste worksheet1 into alldata.xls (into a new worksheet)
So that at the end of this code I will have the original 25 files and a new file that contains 25 worksheets or tabs, containing the data that is in the 25 files.
So far I can loop through all of the files, open them, and access their data.
I am having trouble with the actual copy / paste.
I have been toying with worksheet.copy and worksheet.paste methods, but I cannot seem to get it to work.
Hope this post is straight forward enough.
Any help is greatly appreciated.
Thanks
sb