Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello I have a script that loops through copying sheets as below, it
imports 7 sheets then goes through this loop: Worksheets(7).Select Worksheets(7).Copy After:=Sheets(7) Worksheets(8).Name = szUserid This basically loops through and creates identical sheets that are then populated with data. All in all it creates about 40-50 sheets. All with different names. Te first time I run it it works fine. Then after that it comes up with a error: Runtime Error 1004 Copy Method of Worksheet Clase Failed. I have restarted Excel and it still wont run, then restarted the PC and it still wont run. I then close excel wait a while and try it again and it runs. Nothing has changed. Very weird. The files I am asking it to create exist and the method works most of the time so is it a memory problem, but restarting the PC should solve this. Any ideas gratefully received. Thanks John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Keyboards Shortcuts in Excel 2002 Failing to Work | Excel Discussion (Misc queries) | |||
Excel Macro Security Failing | Excel Discussion (Misc queries) | |||
select method of range class failing ? | Excel Programming | |||
add method of validation failing | Excel Programming | |||
Copy Method | Excel Programming |