+ Reply to Thread
Results 1 to 7 of 7

Trigger Worksheet Change by copy and paste

  1. #1
    Registered User
    Join Date
    06-30-2008
    Location
    Georgia
    MS-Off Ver
    2013
    Posts
    72

    Trigger Worksheet Change by copy and paste

    The following code seems to work fine if the user selects a value from the drop down cell in column T, but if that user then copies and pastes his selection into subsequent cells, it appears that the event is not trigger so the data validation does not get added to column S as it should. Could anyone provide some assistance to this? I am sure my code is a little redundant (still trying to learn all this). This code is on the actual sheet tab, just in case you didn't already know that.
    Please Login or Register  to view this content.
    Last edited by maddog9486; 05-20-2014 at 12:07 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: Trigger Worksheet Change by copy and paste

    but if that user then copies and pastes his selection into subsequent cells
    Please Login or Register  to view this content.
    does different stuff to if it is 1.

    I also note you use different passwords for protecting and un-protecting the worksheet.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-30-2008
    Location
    Georgia
    MS-Off Ver
    2013
    Posts
    72

    Re: Trigger Worksheet Change by copy and paste

    Trevor - sorry the password thing was a typo. They are all the same.

    As for the > 1 part, without this code I cannot clear the contents of multiple cells in that range with an error. My research led me to this technique and it worked lol.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: Trigger Worksheet Change by copy and paste

    Difficult to know without the workbook, and an understanding of the exact steps you follow. I can set up what I think it looks like and I can change a value in column T and get the DV in column S. If I delete a whole bunch of cells in column T it will clear the DV and lock the cells.

    What I'm saying is that I don't really know how to reproduce the problem. I don't know what cells have what values and, if you get the DV in a cell, which cells are you trying to copy it to?

    Regards, TMS

  5. #5
    Registered User
    Join Date
    06-30-2008
    Location
    Georgia
    MS-Off Ver
    2013
    Posts
    72

    Re: Trigger Worksheet Change by copy and paste

    Ok, I will try to get a sample workbook up shortly. I have experienced a run-time 1004 error now so once that is fixed I will post back here.

  6. #6
    Registered User
    Join Date
    06-30-2008
    Location
    Georgia
    MS-Off Ver
    2013
    Posts
    72

    Question Re: Trigger Worksheet Change by copy and paste

    As requested, I have attached a sample workbook with my current code. In column T, in the red highlighted cells you will have a dropdown to select an option. If you select one that starts with a "P", column S then highlights red, data validation is added and the cell gets unlocked. Now the issue is, if you copy that "P" code" and paste it in the red cells below it, column S will still highlight red due to conditional formatting, but the data validation trigger does not fire. Any help would be appreciated as this is the last piece to completing my sheet.

    NOTE: I added the sample effort file for you to load first.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-30-2008
    Location
    Georgia
    MS-Off Ver
    2013
    Posts
    72

    Red face Re: Trigger Worksheet Change by copy and paste

    I was able to solve this. This following is the updated code placed on the sheet I wanted it to run on.

    Please Login or Register  to view this content.

+ 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] Worksheet Change Trigger - Update Another Cell
    By Coeus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2013, 04:59 AM
  2. Copy and Paste using worksheet change
    By arader1216 in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 02-05-2012, 12:12 AM
  3. Link to cell in different sheet - trigger copy/paste transposed row into column
    By janethenoob in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2011, 01:42 PM
  4. Cell value trigger copy paste macro
    By byrdsongdl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2010, 03:43 PM
  5. [SOLVED] Cell value change to trigger macro (worksheet change event?)
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 10:00 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