Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error on sh.Paste sh.Range = ("A1")
First one works (Macro 2000) Second one (same code) doesn't. Error on Sh.Paste sh.Range = ("A1"). Sub Macro2000() ' Dim sh As Worksheet 'copy range from template sheet Sheets("Ind Templates").Rows("38:50").Copy 'for each sheet in workbook after "ind templates" x = Sheets("Ind Templates").Index For Each sh In ThisWorkbook.Sheets If sh.Index x Then 'paste the copied data 1row below the last row used sh.Paste sh.Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End If Next Application.CutCopyMode = False End Sub Sub Macro1000() Dim sh As Worksheet 'copy range from template sheet Sheets("Ind Templates").Rows("1:15").Copy 'for each sheet in workbook after "ind templates" x = Sheets("Ind Templates").Index For Each sh In ThisWorkbook.Sheets If sh.Index x Then 'paste the copied data 1row below the last row used sh.Paste sh.Range = ("A1") End If Next Application.CutCopyMode = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error: If Range("AZ" & intCounter).Text = "" Then | Excel Programming | |||
Error Help - Method "Range" of object "_Worksheet" failed. | Excel Programming | |||
Shortcut key for "Paste Options" and "Error Checking" buttons? | Excel Discussion (Misc queries) | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
"Subscript out of range" error for: Workbooks("Test1.xls").Save | Excel Programming |