Hi im trying to run a bit of code thats always worked fine before and has not been recently changed however now im getting this error "PasteSpecial method of Range class failed" when getting to the line in red below
Selection.EntireRow.Hidden = False 'unhidden
Range("A" & MOVEROW).EntireRow.Select 'select whole row to move
Range("A" & MOVEROW).EntireRow.Copy 'copy whole row to move
Sheets(3).Select
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData 'show all
Range("A65536").End(xlUp).Offset(1, 0).Select 'goes to bottom of spreadsheet and then shift end up
If ActiveCell.Row = 2 Then Selection.Offset(1, 0).Select 'stop info going in row 2
TOLINE = ActiveCell.Row 'defines line pasting info to
Range("A" & TOLINE).Select 'selects bottom row on TO sheet
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats
Im a little confused because the code hasnt been changed since it was last run so im not sure if there is anything wrong at all...
Thanks in advance
Selection.EntireRow.Hidden = False 'unhidden
Range("A" & MOVEROW).EntireRow.Select 'select whole row to move
Range("A" & MOVEROW).EntireRow.Copy 'copy whole row to move
Sheets(3).Select
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData 'show all
Range("A65536").End(xlUp).Offset(1, 0).Select 'goes to bottom of spreadsheet and then shift end up
If ActiveCell.Row = 2 Then Selection.Offset(1, 0).Select 'stop info going in row 2
TOLINE = ActiveCell.Row 'defines line pasting info to
Range("A" & TOLINE).Select 'selects bottom row on TO sheet
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats
Im a little confused because the code hasnt been changed since it was last run so im not sure if there is anything wrong at all...
Thanks in advance