ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   more workbooks in one (https://www.excelbanter.com/excel-programming/291197-more-workbooks-one.html)

71marco71[_11_]

more workbooks in one
 
I have a macro that join more workbooks in one.
I would like to write this macro in one sheet named “report” and cop
to it every month all sheets contained in the others workbooks I wan
to join. Than I would like to number the pages.
Someone can help me?

bkList = Array("Bk1.xls", "Bk2.xls", "Bk3.xls", "Bk4.xls", "Bk5.xls"
"Bk6.xls", "Bk7.xls")
for i = lbound(bkList) to ubound(bklist)
set wkbk = workbooks.Open(blList(i))
if i = lbound(bkList) then
wkbk.Sheets.copy set wkbk1 = ActiveWorkbook
else
wkbk.Sheets.Copy After:=wkbk1.Sheets(wkbk1.sheets.count)
end if
Nex

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com