+ Reply to Thread
Results 1 to 9 of 9

Copy Paste some rows triggered events

  1. #1
    Registered User
    Join Date
    12-01-2015
    Location
    Indonesia
    MS-Off Ver
    MS Office 2010 and 2013
    Posts
    76

    Copy Paste some rows triggered events

    Dear All,

    I have a problem with the vba code that fails to run (Attached) on Worksheet_Change event. I expect that VBA can run when I triggered by copy paste some rows on target.
    Here is the VBA code :

    Please Login or Register  to view this content.
    When I make copy from A2 then paste to A3:A5, it's fails to run the VBA.

    Please advice for the proper VBA code.

    Thank you
    Attached Files Attached Files
    Last edited by omegaboost; 03-11-2018 at 11:41 AM. Reason: add code tags

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,369

    Re: Copy Paste some rows triggered events

    Change:

    Please Login or Register  to view this content.
    to:

    Please Login or Register  to view this content.
    BTW:Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    12-01-2015
    Location
    Indonesia
    MS-Off Ver
    MS Office 2010 and 2013
    Posts
    76

    Re: Copy Paste some rows triggered events

    Dear xladept,

    Thank you for the solution, but unfortunately I got error after i change the code.

    BTW for the next posting, I will follow the forum rules.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,369

    Re: Copy Paste some rows triggered events

    Try changing:

    Please Login or Register  to view this content.
    to:

    Please Login or Register  to view this content.
    *You can edit your post #1 - just highlight the code and click on the #.

  5. #5
    Registered User
    Join Date
    12-01-2015
    Location
    Indonesia
    MS-Off Ver
    MS Office 2010 and 2013
    Posts
    76

    Re: Copy Paste some rows triggered events

    Dear xladept,
    Still got error with that code. If I copy than paste into a single row, It's working but if paste into multiple rows than got error run time error"13".

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    365
    Posts
    7,457

    Re: Copy Paste some rows triggered events

    How about
    Please Login or Register  to view this content.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,369

    Re: Copy Paste some rows triggered events

    Maybe if you remove the .Value:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-01-2015
    Location
    Indonesia
    MS-Off Ver
    MS Office 2010 and 2013
    Posts
    76

    Re: Copy Paste some rows triggered events

    Dear Fluff13,

    Thank you for your solution. It is work.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    365
    Posts
    7,457

    Re: Copy Paste some rows triggered events

    Glad we could help & thanks for the feedback

+ 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 not triggered when I copy and paste
    By Lucille Boshoff in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-15-2016, 10:43 AM
  2. Event triggered copy/paste data rows to program defined worksheets
    By K Rose in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-15-2015, 11:34 AM
  3. ComboBox/Dropdown change events triggered when Saving As
    By cristinik in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2015, 07:11 AM
  4. Debug vbs code to copy and paste info from Sh1 to Sh2 triggered by selection
    By FlyFisherman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-19-2013, 10:26 PM
  5. Time-Triggered Cell Copy/Paste
    By gandolff in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-01-2009, 07:04 AM
  6. [SOLVED] Re : Excel Events Triggered by the Forward and Back Buttons
    By TKT-Tang in forum Excel General
    Replies: 0
    Last Post: 03-21-2006, 02:40 AM
  7. [SOLVED] Disable Form Events From Being Triggered
    By JGeniti in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2005, 03:05 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