Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom
Could you complete your good answer Thank you very muc -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to join sheets from different workbooks | New Users to Excel | |||
how do I join two separate workbooks? | New Users to Excel | |||
Join workbooks | Excel Discussion (Misc queries) | |||
i want to join values of sheets together | Excel Discussion (Misc queries) | |||
How do I join two workbooks into one pivot table? | Excel Worksheet Functions |