Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
assemble worksheets into one workbook | Excel Discussion (Misc queries) | |||
Excel-how to link source workbook to copy of destination workbook | Excel Worksheet Functions | |||
when opening an Excel Workbook, another blank workbook also opens | Excel Discussion (Misc queries) | |||
Excel workbook is corrupted, workbook automatically saves on start | Excel Discussion (Misc queries) | |||
assemble link from different cells and return value | Excel Worksheet Functions |