Results 1 to 3 of 3

VB Code no longer working

Threaded View

  1. #1
    Registered User
    Join Date
    02-04-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Angry VB Code no longer working

    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?

    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
    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?

    Please help..........
    Last edited by alansidman; 05-06-2014 at 09:50 AM. Reason: code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PasteSpecial in VBA Code No Longer Working
    By kmsandrbs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2014, 01:27 PM
  2. [SOLVED] Private sub code no longer working (print area macro)
    By rikkyshh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2013, 10:43 AM
  3. [SOLVED] Code stopped working, can no longer copy and save a worksheet
    By Oracle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2012, 07:56 PM
  4. VBA Code no longer working
    By jdbel in forum Excel General
    Replies: 16
    Last Post: 11-16-2011, 07:33 PM
  5. mail Code no longer working in 2007
    By lonnied in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2007, 06:14 PM

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