Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am hoping that someone can help me.
I need some help with copying worksheets. I extract data from an operating system using Discoverer and then export into excel. These reports are ran weekly. Discoverer automatically names the workbooks the same name each week. There are five workbooks. I would like to create a macro that copies the Worksheets(1) of each of the five workbooks into one workbook (as separate sheets). I would like to specific the files and files path in the code (not using a browse option). |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Look into Ron web http://www.rondebruin.nl/copy3.htm if this helps please click yes thanks "Max2073" wrote: I am hoping that someone can help me. I need some help with copying worksheets. I extract data from an operating system using Discoverer and then export into excel. These reports are ran weekly. Discoverer automatically names the workbooks the same name each week. There are five workbooks. I would like to create a macro that copies the Worksheets(1) of each of the five workbooks into one workbook (as separate sheets). I would like to specific the files and files path in the code (not using a browse option). |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
This appears to merge the worksheets into one, I want to copy the sheets from different workbooks and create a new workbook with the sheets being retained and I want to state paths and filenames eg: c:\documents and settings\max\example1.xls (sheet1) and c:\documents and settings\max\example2.xls (sheet1) etc "Eduardo" wrote: Hi, Look into Ron web http://www.rondebruin.nl/copy3.htm if this helps please click yes thanks "Max2073" wrote: I am hoping that someone can help me. I need some help with copying worksheets. I extract data from an operating system using Discoverer and then export into excel. These reports are ran weekly. Discoverer automatically names the workbooks the same name each week. There are five workbooks. I would like to create a macro that copies the Worksheets(1) of each of the five workbooks into one workbook (as separate sheets). I would like to specific the files and files path in the code (not using a browse option). |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
See
http://www.rondebruin.nl/fso.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Max2073" wrote in message ... Hi, This appears to merge the worksheets into one, I want to copy the sheets from different workbooks and create a new workbook with the sheets being retained and I want to state paths and filenames eg: c:\documents and settings\max\example1.xls (sheet1) and c:\documents and settings\max\example2.xls (sheet1) etc "Eduardo" wrote: Hi, Look into Ron web http://www.rondebruin.nl/copy3.htm if this helps please click yes thanks "Max2073" wrote: I am hoping that someone can help me. I need some help with copying worksheets. I extract data from an operating system using Discoverer and then export into excel. These reports are ran weekly. Discoverer automatically names the workbooks the same name each week. There are five workbooks. I would like to create a macro that copies the Worksheets(1) of each of the five workbooks into one workbook (as separate sheets). I would like to specific the files and files path in the code (not using a browse option). |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try the below
Sub savejobC() Dim wb1 As Workbook, wb2 As Workbook, intTemp As Integer Dim strFolder As String, arrBooks As Variant strFolder = "c:\" arrBooks = Array("1.xls", "2.xls", "3.xls", "4.xls", "5.xls") Set wb1 = ActiveWorkbook 'current workbook 'Set wb1 = Workbooks.Open("<fullpath\<filename.ext") 'existing workbook For intTemp = 0 To 4 Set wb2 = Workbooks.Open(CStr(strFolder & arrBooks(intTemp))) wb2.Sheets(1).Copy After:=wb1.Sheets(wb1.Worksheets.Count) wb2.Close False Next End Sub If this post helps click Yes --------------- Jacob Skaria "Max2073" wrote: I am hoping that someone can help me. I need some help with copying worksheets. I extract data from an operating system using Discoverer and then export into excel. These reports are ran weekly. Discoverer automatically names the workbooks the same name each week. There are five workbooks. I would like to create a macro that copies the Worksheets(1) of each of the five workbooks into one workbook (as separate sheets). I would like to specific the files and files path in the code (not using a browse option). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I get an error message while copying worksheets between workbooks | Excel Discussion (Misc queries) | |||
Copying worksheets with formulae between workbooks | Excel Discussion (Misc queries) | |||
Deleting and Copying Marco code | Excel Discussion (Misc queries) | |||
Copying Formats between workbooks and worksheets | Excel Discussion (Misc queries) | |||
Copying Several Workbooks into one Workbook as Worksheets | New Users to Excel |