Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You only need to copy the range once. However, what you got should work.
But since it isn't working, see if Excel complains with this... Sub Populate_Stocks3() Application.ScreenUpdating = False Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("WorkCap1").Range("A:D").PasteSpecial Worksheets("WorkCap2").Range("A:D").PasteSpecial Worksheets("MISC").Range("A:D").PasteSpecial Worksheets("MISC2").Range("A:D").PasteSpecial Worksheets("MISC3").Range("A:D").PasteSpecial Worksheets("MISC4").Range("A:D").PasteSpecial Worksheets("MISC5").Range("A:D").PasteSpecial Worksheets("PeriodDate").Range("A:D").PasteSpecial Application.CutCopyMode = False Sheets("Instructions").Select Application.ScreenUpdating = True End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "SteveC" wrote in message Using the following code from a Bernie Deitrick post. It works fine until it gets to sheet MISC5, then I get the error: Excel cannot complete this task with available resources. Choose less data or close other applications. Then I click "ok", and i get another errror message, this one from the VBA: run time error 1004 copy of range class message failed." Even when I break up the code into tinier pieces, it almost always stops at worksheet MISC5 wtih the above error msg. There is nothing about that worksheet that is unusually different than other worksheets. Am I doing anything wrong with this code, or is there anything else I can do? thanks a lot. SteveC Sub Populate_Stocks3() Application.ScreenUpdating = False Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("WorkCap1").Range("A:D") Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("WorkCap2").Range("A:D") Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("MISC").Range("A:D") Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("MISC2").Range("A:D") Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("MISC3").Range("A:D") Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("MISC4").Range("A:D") Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("MISC5").Range("A:D") Worksheets("Input_Stocks").Range("c:f").Copy Worksheets("PeriodDate").Range("A:D") Sheets("Instructions").Select Application.ScreenUpdating = True End |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Where does the error occur? -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "SteveC" wrote in message Hi, that seemed to work yesterday, but today I'm getting the error again... here is some slightly modified code. Any other suggestions? thanks very much for taking a look. SteveC Run-time error '1004': PasteSpecial method of Range class failed Sub Populate_Stocks() Application.ScreenUpdating = False Sheets("Input_Stocks").Select Range("C20:F20").Select Range(Selection, Selection.End(xlDown)).Select Application.CutCopyMode = False Selection.Copy Sheets("Input_Stocks").Select Range("c20").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Worksheets("Input_Stocks").Range("C20:F3000").Copy Worksheets("ROIC").Range("A20:d3000").PasteSpecial Worksheets("R&D").Range("A20:d3000").PasteSpecial Worksheets("OL_PV").Range("A20:d3000").PasteSpecia l Worksheets("OL_Initial").Range("A20:d3000").PasteS pecial Worksheets("OL_Initial_2").Range("A20:d3000").Past eSpecial Worksheets("OL5yr").Range("A20:d3000").PasteSpeci al Worksheets("OL_PV_SEG").Range("A20:d3000").PasteSp ecial Worksheets("WACC").Range("A20:d3000").PasteSpecial Worksheets("WorkCap1").Range("A20:d3000").PasteSpe cial Worksheets("WorkCap2").Range("A20:d3000").PasteSpe cial Worksheets("MISC").Range("A20:d3000").PasteSpecial Worksheets("MISC2").Range("A20:d3000").PasteSpecia l Worksheets("MISC3").Range("A20:d3000").PasteSpecia l Worksheets("MISC4").Range("A20:d3000").PasteSpecia l Worksheets("MISC5").Range("A20:d3000").PasteSpecia l Worksheets("PeriodDate").Range("A20:d3000").PasteS pecial Application.CutCopyMode = False Sheets("Instructions").Select Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel cannot complete this task with availible resources | Setting up and Configuration of Excel | |||
Excel cannot complete this task with available resources | Excel Worksheet Functions | |||
Excel cannot complete this task with available resources. | Excel Worksheet Functions | |||
Excel 2002 error: cannot complete with available resources when co | Excel Discussion (Misc queries) | |||
Excel cannot complete this task with available resources. | Excel Discussion (Misc queries) |