Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to join sheets from different workbooks arashi New Users to Excel 1 February 11th 11 10:00 AM
how do I join two separate workbooks? Mike[_22_] New Users to Excel 1 June 10th 09 07:58 PM
Join workbooks ruby Excel Discussion (Misc queries) 3 June 9th 09 06:33 PM
i want to join values of sheets together Islam rashed Excel Discussion (Misc queries) 1 September 12th 07 11:12 AM
How do I join two workbooks into one pivot table? Eqa Excel Worksheet Functions 0 March 29th 07 07:54 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"