+ Reply to Thread
Results 1 to 21 of 21

macro copy paste

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    macro copy paste

    Hello everyone.
    In the attached macro is disabled:

    Please Login or Register  to view this content.
    Now the macro in the module:

    Please Login or Register  to view this content.

    It does not work anymore.
    Help to correct.
    Thanks in advance.
    max
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro copy paste

    Hello max_max,

    Try it as follow:

    Please Login or Register  to view this content.
    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi max_max



    Your Code is firing the Workbook_Sheet SelectionChange Event Code which is emptying the Clipboard.

    Try this...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Hello winon.
    It works the first time
    the second gives error.
    max
    Last edited by max_max; 10-01-2016 at 04:10 PM.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro copy paste

    Hi max_max,

    Another alternative would be:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Hello

    the changes of jaslake work

    the changes of winon not work

    a greeting and thanks.
    max

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi max

    I'll not say "Never" but it's my experience you'll not need this line in your Code...
    Please Login or Register  to view this content.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Hello.
    it is possible this macro functions only on sheet 2 - sheet 3 etc .. and not in sheet1?


    Please Login or Register  to view this content.
    max

  9. #9
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Thanks jaslake.
    A control response to # 8?
    Thanks again.
    max

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi Max

    See if this works for you...
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Thanks jaslake.
    the new change does not work well.

    In "Foglio1" does not work
    Application.CellDragAndDrop = False

    In "Foglio1" works
    Application.CutCopyMode = False

    I attach example.
    max
    Attached Files Attached Files

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi Max

    I don't understand what you're trying to accomplish.

  13. #13
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro copy paste

    Hello max_max,

    Please add the Code below to ThisWorkbook Module:

    Please Login or Register  to view this content.
    Regards.

  14. #14
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    I hope to explain myself with google translator.

    Open workbook
    click Foglio2 in cell yellow
    click in Foglio1
    in Foglio1 not work CellDragAndDrop
    in Foglio1 work CutCopyMode

    I hope I explained.
    max

    I corrected the reply
    Last edited by max_max; 10-02-2016 at 03:06 PM.

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi Max

    What do you wish to work in Foglio 1?

    Drag and Drop...Yes? No?
    Cut Copy...Yes? No?

  16. #16
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro copy paste

    Hi max_max,

    Please see attached sample Workbook. Does it work for you?

    Foglio2 is Password protected, without us knowing what the Password is.

    Ciao
    Attached Files Attached Files

  17. #17
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    For jaslake:

    in foglio1
    Drag and Drop...Yes
    Cut Copy...Yes

  18. #18
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro copy paste

    Try the revised attachment now, please.

  19. #19
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Thanks Winon,
    your modification works.
    But if more than one sheet?
    example:
    sheet1 Drag and Drop ... Yes
    sheet1 Cut Copy ... Yes
    ----------------------------------------------
    Sheet2 Drag and Drop ... no
    Sheet2 Cut Copy ... no
    ----------------------------------------------
    Sheet3 Drag and Drop ... Yes
    Sheet3 Cut Copy ... Yes
    ----------------------------------------------
    Sheet4 Drag and Drop ... Yes
    Sheet4 Cut Copy ... Yes
    ---------------------------------------------

  20. #20
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro copy paste

    Please test the attached revised sample Workbook, max_max,

    It should do what you want.

    Regards.

  21. #21
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    @Winon

    It's yours...no sense we both bang our head against the wall.

+ 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. Replies: 0
    Last Post: 01-13-2016, 08:50 PM
  2. Copy paste - cute paste macro almost working
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2014, 12:33 PM
  3. Copy & paste in macro doesn't paste all cells
    By pltrapper in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2013, 09:22 AM
  4. [SOLVED] Simple copy and paste macro- Paste special help needed.
    By hernancrespo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2012, 07:02 AM
  5. [SOLVED] Macro to Find, copy, paste, find, copy, paste, find, copy, paste, u get the picture....
    By westsoldman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-12-2012, 01:12 AM
  6. 2 Macro's: only vertical copy/paste action and copy-paste 14 columns to the right.
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2010, 10:34 AM
  7. [SOLVED] Copy and Paste macro needs to paste to a changing cell reference
    By loulou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2005, 07:06 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