Results 1 to 3 of 3

Problem with data transfer (erasing old data)

Threaded View

  1. #1
    Registered User
    Join Date
    12-23-2015
    Location
    Richmond, Va
    MS-Off Ver
    Office14
    Posts
    3

    Problem with data transfer (erasing old data)

    So, the issue is we have a worksheet (I did not create) and it basically keeps track of a data list that can be transferred to other sheets upon a drop down.
    It was working fine, now all of a sudden, it's deleting the old data that was there.

    We have 3 sheets.
    Sheet 1 being open locks
    Sheet 2 being closed locks
    Sheet 3 being turn down locks
    There is a drop down on the open locks sheet that allows us to move it to another sheet based on whether it is closed or a turn down.

    Say you move an open lock to TD, it is currently deleting the last entry.

    If there is person A, B, C
    You move A, it will transfer
    You move B, it will transfer but delete A
    You move C, it will transfer but delete B.

    Private Sub worksheet_change(ByVal target As Range)
    Application.ScreenUpdating = False
    intcolumn = target.Column
    introw = target.Row
    
                    If target.Column = 14 And target.Cells.Count = 1 Then
           If target.Value = "Closed" Then
           If MsgBox("Do you want to move to Closed? ", vbQuestion + vbYesNo, "MyApp") = vbYes Then
           Range("A1910:R1910").Select
            Selection.AutoFill Destination:=Range("A1910:R1911"), Type:=xlFillDefault
           intcolumn = target.Column
    
    introw = target.Row
    
               target.EntireRow.Copy
               Sheets("Closed Locks").Activate
               ActiveSheet.Range("a1").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Select
               ActiveSheet.Paste
                          Sheets("Open Locks").Activate
               target.EntireRow.Delete
               Range("C11").Select
                       
                     End If
                     Else
                     
                               If target.Column = 14 And target.Cells.Count = 1 Then
           If target.Value = "TD" Or target.Value = "RegTD" Then
                  If MsgBox("Do you want to move to TD? ", vbQuestion + vbYesNo, "MyApp") = vbYes Then
           Range("A1910:R1910").Select
            Selection.AutoFill Destination:=Range("A1910:R1911"), Type:=xlFillDefault
           intcolumn = target.Column
    
    introw = target.Row
    
               target.EntireRow.Copy
               Sheets("TD Locks").Activate
               ActiveSheet.Range("A1").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Select
               ActiveSheet.Paste
                          Sheets("Open Locks").Activate
               target.EntireRow.Delete
                           Range("C11").Select
                  End If
    End If
    End If
    End If
    End If
    End Sub
    Any help is greatly appreciated as the person that created the workbook is way too busy to fix it. Hence, why I'm here. Thanks!
    Last edited by SoloMon3y; 12-23-2015 at 11:32 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. transfer data problem
    By Dfrost in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-27-2015, 01:25 AM
  2. Web data to excel without erasing while refreshing
    By Afroo in forum Excel General
    Replies: 2
    Last Post: 03-25-2015, 02:40 AM
  3. Problem looping a macro with offset rangesto transfer data
    By mmurphy77 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2013, 10:31 PM
  4. clear texboxes and lists without erasing data in spreadsheet
    By keiperg813 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2013, 05:49 AM
  5. Data transfer problem with Macros
    By hemiso in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2013, 01:38 PM
  6. Adding old and new data without erasing old data
    By Don Juan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-16-2008, 06:37 PM
  7. Data worksheet transfer problem
    By jdub_92 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2008, 08:13 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