silverxx12
Board Regular
- Joined
- Jan 23, 2009
- Messages
- 99
Hi
I used to use excel 2003 - upgraded to 2013 and some issues have come up:i used the following code to copy and paste into another workbook but i am getting an error message at the last stage of inserting the copied rows - worked fine in 2003 not sure what is wrong can someone please help boss is driving me mad
!!
This is the code:
Im getting some sort of run time error 1004 - saying insert method of range class failed
Please can someone help i'm sure if simple just havent got my head round 2013 yet
Regards
Silver
I used to use excel 2003 - upgraded to 2013 and some issues have come up:i used the following code to copy and paste into another workbook but i am getting an error message at the last stage of inserting the copied rows - worked fine in 2003 not sure what is wrong can someone please help boss is driving me mad
!!
This is the code:
Code:
Rows("2:2").Select (copying the data from another temp file) Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
End If
'open file'
Application.Workbooks.Open("C:.xls").Activate ( this open the workbook i need to insert copied cells into)
'remove autofilter'
If ActiveSheet.AutoFilterMode = True Then
ActiveSheet.AutoFilterMode = False
End If
'go to last row'
If Range("b2").Value = "" Then
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Else
ActiveWindow.FreezePanes = False
Rows("2:2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).EntireRow.Select
Selection.Insert Shift:=xlDown
End If
Im getting some sort of run time error 1004 - saying insert method of range class failed
Please can someone help i'm sure if simple just havent got my head round 2013 yet
Regards
Silver