Simple Row Cut & Paste Not Working For Some Reason

  • Hi Al


    I'm sure I have used this code numerous times in the past but for some reason its not working.


    I'm getting a 1004 error on this code:



    It doesn't matter how I rework it, I still get errors, for example if I do a simple "paste" then I get 438 errors:



    If I change the Rows to a range and the Range to a rows still get the errors.


    Any ideas, this should work.


    Thanks

  • Re: Simple Row Cut & Paste Not Working For Some Reason


    Try

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Re: Simple Row Cut & Paste Not Working For Some Reason


    I fixed a referencing bit in your code to the below and it worked:



    Don't know why yours worked and not mine though.


    Thanks though :)

  • Re: Simple Row Cut & Paste Not Working For Some Reason


    You're welcome.


    Notice I did not cut the row from "Inbound", when you cut a row you need to Insert that row into another sheet not use PasteSpecial.


    I find it easier to copy the row to the new sheet then delete the original row.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Re: Simple Row Cut & Paste Not Working For Some Reason


    I don't see any referencing that you fixed, all you did was remove the turning off of ScreenUpdating.


    Turning off ScreenUpdating makes the code run faster and stops screen flickering.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Re: Simple Row Cut & Paste Not Working For Some Reason


    This part:


    (wsN.Cells(wsN.Rows.Count, 1).End(xlUp).Row + 1, 1)


    The original wasn't finding the new lastrow on the correct sheet.





    Good to know about the cut command, I'll be sure to remember that in future. I usually copy and then delete as well but thought why not just have one line instead of two.

  • Re: Simple Row Cut & Paste Not Working For Some Reason


    Ahh yes I see it now :)


    My bad for leaving that out!

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!