![]() |
join more workbooks in one and print sheets
Hello friends
Every month I have to make a report for my boss. I have to print a lo of tables and charts contained in 7 workbook. Is it possible to make macro that join all workbooks in one and print all sheets contained i the new workbook? the new workbook doesn't have to contain all sheet of 7 workbooks because some sheets are not need and i don't prin them. I also have to number the pages before printing. Thanks in advance for your hel -- Message posted from http://www.ExcelForum.com |
join more workbooks in one and print sheets
Generally do something like this pseudocode.
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 Next ' now delete sheets you don't want wkbk1.Sheets.Select activewindows.SelectedSheets.Printout -- Regards, Tom Ogilvy 71marco71 wrote in message ... Hello friends Every month I have to make a report for my boss. I have to print a lot of tables and charts contained in 7 workbook. Is it possible to make a macro that join all workbooks in one and print all sheets contained in the new workbook? the new workbook doesn't have to contain all sheets of 7 workbooks because some sheets are not need and i don't print them. I also have to number the pages before printing. Thanks in advance for your help --- Message posted from http://www.ExcelForum.com/ |
join more workbooks in one and print sheets
Thank you Tom
The macro works fine but for I have to specify, during the macro run, that I don’t want to update data contained in one workbook I had ope (the wkbk have a link with other workbooks present in my directory) It’ s possible to avoid this problem? I would like to know some thing too 1) I don’t understand how the new workbook that will contain all sheet is open. Which line of your macro open the new workbook…I can see copy command but I don’t see a paste command. How can I give a specifi name to the new workbook and save it in a specific forlder? I woul like also close the workbook I had previously open without saving it. 2) Where I have to input your macro (in which Workbook I can input it) 3) Before printing I have to number the pages…How can I do it? Thank you very much for your help and sorry if I asked dumb question but I’m a beginner in vb -- Message posted from http://www.ExcelForum.com |
join more workbooks in one and print sheets
Hi Tom
Could you complete your good answer Thank you very muc -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 11:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com