Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Method of Workseet Class Failed
Hey there,
I am having an issue with one of my macros, and was wondering if anyone here can help. To start off, I have searched throughout Google, and it seems that the only answer I can find on there has to do with issues in previous versions of Excel - problems that were solved in Excel 2002, which is what I have. Anyways, I have a fairly big project where I am running 400 records of data through a macro - it runs fine up until record 280, when I get the error listed above. Pretty much, the 400 records are getting split into MANY different workbooks - up to 100 different workbooks based on various criteria. Here is the code itself: Set wkb = Workbooks("Initialize.xls") wkb.Activate Sheets("Template").Select ''The next line is where the error occurs Sheets("Template").Copy Befo=Workbooks(WksVar.Range("Filename").Value & "msts.xls").Worksheets(1) Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Method of Workseet Class Failed
Is it possible, that you have too many worksheets in the
workbook, where you are trying to copy a new sheet. The only limitation of sheets in a workbook in Excel 2002 is the amount of available memory. Ecco -----Original Message----- Hey there, I am having an issue with one of my macros, and was wondering if anyone here can help. To start off, I have searched throughout Google, and it seems that the only answer I can find on there has to do with issues in previous versions of Excel - problems that were solved in Excel 2002, which is what I have. Anyways, I have a fairly big project where I am running 400 records of data through a macro - it runs fine up until record 280, when I get the error listed above. Pretty much, the 400 records are getting split into MANY different workbooks - up to 100 different workbooks based on various criteria. Here is the code itself: Set wkb = Workbooks("Initialize.xls") wkb.Activate Sheets("Template").Select ''The next line is where the error occurs Sheets("Template").Copy Befo=Workbooks(WksVar.Range ("Filename").Value & "msts.xls").Worksheets(1) Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-time error '1004': AutoFill method of Range class failed | Excel Discussion (Misc queries) | |||
Why am I getting R/T 1004 - Copy method of Rng class failed? | Excel Discussion (Misc queries) | |||
Error 1004 Copy method of worksheet class failed | Excel Discussion (Misc queries) | |||
Autofill method of range class failed | Excel Discussion (Misc queries) | |||
Autofill method of range class failed | Excel Discussion (Misc queries) |