I am extremely new to Macros and VB. As a matter of fact, it is a miracle that I actually found what I needed, put int in my spreadsheet and had it working, until others started using the spreadsheet. I don't know what went wrong where. Essentially, I had the following code written: Sheet 2 is 2014 Investigations and sheet 3 is completed investigations. I wanted a row from sheet 2 moved to sheet 3 when an x is placed in Column Z. If I get this functioning once again, what will happen if I add another column?
This moved a row of data to a new worksheet labeled Completed Events when an x was chosen from a drop down menu in row z. It no longer works and I can't figure out how to fix it. Sheet 2 is 2014 Investigations and sheet 3 is completed investigations. I wanted a row from sheet 2 moved to sheet 3 when an x is placed in Column Z. If I get this functioning once again, what will happen if I add another column?![]()
Private Sub Worksheet_Change(ByVal Target As Range) Dim rngDest As Range Set rngDest = Sheet3.Range("rngDest") 'Limit the trap area to range of cells in which completed dates are entered as defined above If Not Intersect(Target, Sheet2.Range("rngTrigger")) Is Nothing Then 'Only trigger if the value entered is a date or is recongizable as a valid date If IsDate(Target) Then 'Ensure subsequent deletion of 'moved' row does NOT cause the Change Event to run again and get itself in a loop! Application.EnableEvents = False Target.EntireRow.Select Selection.Cut rngDest.Insert Shift:=xlDown Selection.Delete ' Reset EnableEvents Application.EnableEvents = True End If End If End Sub
Please help..........
Bookmarks