Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi!
I am getting a debug error message on this line: Next wSht Sheets(1).Copy beof=Sheets(1) Sheets(1).Name = shtName Sheets(shtName).Move = Workbook : This is line. I changed it from the original code and I cannot see the error of my ways. The macro does take the active worksheet and creates a new workbook but the error message comes up before I can continue to work with the data. Can anyone help? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This instruction usually takes the form:
Worksheets("Sheet1").Move after:=Worksheets("Sheet3") I would guess there's something missing from your errant line of code i.e. to where should it be moved. "csimont" wrote: Hi! I am getting a debug error message on this line: Next wSht Sheets(1).Copy beof=Sheets(1) Sheets(1).Name = shtName Sheets(shtName).Move = Workbook : This is line. I changed it from the original code and I cannot see the error of my ways. The macro does take the active worksheet and creates a new workbook but the error message comes up before I can continue to work with the data. Can anyone help? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I will try the changes you suggest. Thanks bigwheel!
"bigwheel" wrote: This instruction usually takes the form: Worksheets("Sheet1").Move after:=Worksheets("Sheet3") I would guess there's something missing from your errant line of code i.e. to where should it be moved. "csimont" wrote: Hi! I am getting a debug error message on this line: Next wSht Sheets(1).Copy beof=Sheets(1) Sheets(1).Name = shtName Sheets(shtName).Move = Workbook : This is line. I changed it from the original code and I cannot see the error of my ways. The macro does take the active worksheet and creates a new workbook but the error message comes up before I can continue to work with the data. Can anyone help? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Bigwheel,
I tried your script and the worksheet was copied into the existing file. I need to move the copied worksheet to a new workbook all by it's lonesome self. Suggestions? "csimont" wrote: Hi! I am getting a debug error message on this line: Next wSht Sheets(1).Copy beof=Sheets(1) Sheets(1).Name = shtName Sheets(shtName).Move = Workbook : This is line. I changed it from the original code and I cannot see the error of my ways. The macro does take the active worksheet and creates a new workbook but the error message comes up before I can continue to work with the data. Can anyone help? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Well, as an illustration try this:-
Sheets("Sheet3").Move After:=Workbooks("test2.xls").Sheets(3) changing the sheet name and workbook name to suit your requirements, of course. The target worksheet needs to be open. "csimont" wrote: Bigwheel, I tried your script and the worksheet was copied into the existing file. I need to move the copied worksheet to a new workbook all by it's lonesome self. Suggestions? "csimont" wrote: Hi! I am getting a debug error message on this line: Next wSht Sheets(1).Copy beof=Sheets(1) Sheets(1).Name = shtName Sheets(shtName).Move = Workbook : This is line. I changed it from the original code and I cannot see the error of my ways. The macro does take the active worksheet and creates a new workbook but the error message comes up before I can continue to work with the data. Can anyone help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to sort worksheets within a workbook | Excel Discussion (Misc queries) | |||
Excel should let its worksheets be arranged (tiled) in a workbook | Excel Worksheet Functions | |||
Copying A Worksheet From Each Open Workbook to an new Workbook | Excel Worksheet Functions | |||
Copying the format within a worksheet to all in a workbook | Excel Discussion (Misc queries) | |||
copying cells from other worksheets | Excel Discussion (Misc queries) |