Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
can't copy a sheet within same workbook
I'm trying to make a copy of a sheet right after itself. I first tried
this: Set oSummarySheet = Sheets("WP_DETAIL").Copy After:=Sheets("WP_DETAIL") I get error: "Compile error: Expected: end of statement" The editor highlights "After", so I try: Set oSummarySheet = Sheets("WP_DETAIL").Copy(, Sheets("WP_DETAIL")) Now I get a run-time error '424': Object Required The source sheet exists. In the immediate window, I do this: ?Sheets("WP_DETAIL").index 3 I thought it might be confused about what sheets collection, so I tried: Set oSummarySheet = ThisWorkbook.Sheets("WP_DETAIL").Copy(, ThisWorkbook.Sheets("WP_DETAIL")) Got the run-time error 424 again. What am I doing wrong? Thanks, Woody |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy sheet cells into differnt workbook/sheet, How? | Excel Discussion (Misc queries) | |||
Copy sheet to different workbook | Excel Discussion (Misc queries) | |||
Copy sheet to new workbook | Excel Discussion (Misc queries) | |||
automatic copy and paste from sheet to sheet in a workbook | Excel Programming | |||
Copy sheet from one workbook to another workbook problem | Excel Programming |