+ Reply to Thread
Results 1 to 5 of 5

adjust code to "cut" row instead of delete

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    adjust code to "cut" row instead of delete

    In a userform I have this code deletes a driver record. I am trying to keep a copy of the record before deleting in worksheet "Removed Drivers"


    Please Login or Register  to view this content.
    I have tried this but although the message box displays the correct row number the macro does not paste the record. I can select the cell but it appears nothing is held in the clipboard. Any pointers appreciated

    Please Login or Register  to view this content.
    Last edited by nigelog; 05-15-2017 at 06:42 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: adjust code to "cut" row instead of delete

    Hi nigelog

    This is one way:
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: adjust code to "cut" row instead of delete

    Does your 2nd code block even compile? There seems to be a surplus 'End If' ...

    Also, it would help if you uploaded a sample copy of your workbook, just with the relevant sheets, code and userform - save anybody having to go to the bother of recreating something that already exists.

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: adjust code to "cut" row instead of delete

    @sintek .. appreciated, did the job. Ta

    @cytop .. Code was cut and paste I probably made a mistake removing other code and I was interrupted as I stripped the workbook back and had no chance to attach. I will ensure workbook attached in future posts

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: adjust code to "cut" row instead of delete

    Pleasure...thanks for rep point.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Delete Range that is "locked" by code allowing selection of 1 cell only.
    By Sircool1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2017, 07:05 PM
  2. [SOLVED] Code Clean-Up: Delete "False" worksheet created when "Cancel" is chosen in Input Box
    By Kenny Blackwell in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 08-31-2015, 10:00 AM
  3. [SOLVED] Does a vba code "Range("A4")" change if I delete row 2?
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2015, 11:48 AM
  4. Formula Adjust. Need =IF"" data to remain once entered when =IF"" changes.
    By EDDYJAMES in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-02-2015, 03:44 PM
  5. [SOLVED] Code that copies row of data to another sheet based on text "Complete"/"Delete"
    By Dremzy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-20-2014, 05:51 PM
  6. Replies: 2
    Last Post: 04-20-2014, 11:18 AM
  7. [SOLVED] Script to save to folder in "v:\dept2", confirm file saved, then delete from "v:\dept1"
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2014, 11:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1