Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi I have a problem with a loop that always stops after five times,
and presents "Copy method of Worksheet class failed" The code is : For Year = FirstYear To LastYear Sht2 = "" & Year & " test" Sheets(Sht2).Delete Sht = "" & Year & " table sheet" Sheets(Sht).Copy Befo=Sheets(2) Sheets(Sht & " (2)").Name = Sht2 The loop fails at: Sheets(Sht).Copy Befo=Sheets(2) Sheet(2) is still part of the workbook while the loop breaks down. Any suggestions as to why the loop breaks down? Any help is greately appreciated! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How stop the "started office live" pop-up to stop. it is checked | Excel Discussion (Misc queries) | |||
Loops stop working and presents "Run time error '91': | Excel Programming | |||
"Continue" and Exit with For Loops | Excel Programming | |||
Stop users from accessing "Protection" option from "Tools" menu | Excel Programming | |||
"Stop" not working | Excel Programming |