Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default assemble excel workbook

Excel Folks:

I'd like to asemble several excel worksheets and/or
workbooks into a single workbook. Is there a quicker way
to do this than manually cutting and pasting between
workbooks? Eg:

workbook1 includes sheet a,b, and c

wokbook2 includes sheet d,e, and f

correct incantation occurs <<


workbook3 includes sheet a,b,c,d,e, and f



Similarly, is there a way to import multiple .csv files
into a single workbook in one fell swoop?



Thanks to anyone who can help!

handjive

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default assemble excel workbook

Sub CopyWorkbooksSheets()
With Workbooks("Bk3.xls")
workbooks("Bk1.xls").Sheets.Copy _
After:=.Worksheets(.worksheets.count)
workbooks("Bk2.xls").Sheets.Copy _
After:=.Worksheets(.worksheets.count)
' add more as necessary
End Sub


Sub CopyCSV()
Dim sPath as String
Dim fNames as Variant
sPath = "C:\My Documents\"
fnames = Array("CSV1.csv", "CSV2.csv", "CSV3.csv")
Application.ScreenUpdating = False
for i = lbound(fnames) to ubound(fnames)
set wkbk = workbooks.open(sPath & fNames(i))
Activesheet.copy _
After:=Workbooks("Bk3.xls").Worksheets( _
Workbooks("Bk3.xls").Worksheets.count)
wkbk.Close SaveChanges:=False
Next
Application.ScreenUpdating = True
End Sub

--
Regards,
Tom Ogilvy


handjive wrote in message
...
Excel Folks:

I'd like to asemble several excel worksheets and/or
workbooks into a single workbook. Is there a quicker way
to do this than manually cutting and pasting between
workbooks? Eg:

workbook1 includes sheet a,b, and c

wokbook2 includes sheet d,e, and f

correct incantation occurs <<


workbook3 includes sheet a,b,c,d,e, and f



Similarly, is there a way to import multiple .csv files
into a single workbook in one fell swoop?



Thanks to anyone who can help!

handjive



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
assemble worksheets into one workbook Jill Excel Discussion (Misc queries) 4 September 27th 09 08:51 AM
Excel-how to link source workbook to copy of destination workbook D Lynn Excel Worksheet Functions 1 May 29th 08 05:36 PM
when opening an Excel Workbook, another blank workbook also opens spmu Excel Discussion (Misc queries) 0 October 12th 07 01:46 PM
Excel workbook is corrupted, workbook automatically saves on start Paul Gooda Excel Discussion (Misc queries) 3 September 28th 06 04:51 PM
assemble link from different cells and return value tastic96 Excel Worksheet Functions 2 June 27th 05 01:00 PM


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

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

About Us

"It's about Microsoft Excel"