+ Reply to Thread
Results 1 to 4 of 4

Event Change VBA for dating changes

  1. #1
    Registered User
    Join Date
    10-17-2019
    Location
    brexit, eu
    MS-Off Ver
    10
    Posts
    3

    Event Change VBA for dating changes

    I have a sheet in a workbook that stores completed projects. I would like to add a date column to the end of the row when a project is moved to the 'Completed' sheet. This is what I have so far:

    Please Login or Register  to view this content.

    This works (as in, it dates the new rows). But instead of a single column for date, it adds eleven. The sheet has information in columns A to N, with N being the new date column I want this event change to add. This code adds a date to columns N to W. What can I do to return one date value to column N only?


    Thanks!

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Event Change VBA for dating changes

    If your date column is always going to be N, why not just specify that? I added an event disabling bit to stop any infinite loops, and used 'Not Intersect' to save the 'Exit Sub' from being needed as a separate line.
    Please Login or Register  to view this content.
    When you're copying data that includes, for example, columns G:M (7 columns), the pasted Target (changed cells) includes all of those cells, which is why it's putting a datestamp 13 columns to the right of each of those Target cells.
    Last edited by Paul; 10-18-2019 at 02:06 PM.

  3. #3
    Registered User
    Join Date
    10-17-2019
    Location
    brexit, eu
    MS-Off Ver
    10
    Posts
    3

    Re: Event Change VBA for dating changes

    Thank you THANK YOU thank you! That worked perfectly! I appreciate your explanation for why it was creating so many date columns. I'm new to VBA and this helped me understand the logic.

    You're the best Paul

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Event Change VBA for dating changes

    You're welcome, glad to help!

+ 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] Ho w to prevent Activate event running a Change event
    By Yoepy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-06-2019, 02:25 AM
  2. [SOLVED] change event AND calculate event on the same sheet
    By lauriejerome in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2013, 03:54 PM
  3. How to prevent SelectionChange event firing before Change event?
    By franklyn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2012, 05:17 AM
  4. Worksheet Change event ignore change event
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2011, 12:29 PM
  5. MsgBox in Enter event causes combobox not to run Change event
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2006, 10:55 AM
  6. Worksheet Change Event-change event to trigger
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2005, 06:05 PM
  7. Change event and calculate event
    By Antje in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2005, 04:06 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