+ Reply to Thread
Results 1 to 5 of 5

Looking for workarounds for CopyCutMode

  1. #1
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    Looking for workarounds for CopyCutMode

    Hi all - Using the code below I can't clear the clipboard, the range still selected after copy and paste. Obviously, "Application.CutCopyMode = False" failed. Is there a way to deselect/clear? Using Excel 2010. Thanks

    Please Login or Register  to view this content.
    Last edited by Xceller; 04-20-2014 at 01:20 PM.

  2. #2
    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: Looking for workarounds for CopyCutMode

    Hi Xceller

    Does this work for you?
    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.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Looking for workarounds for CopyCutMode

    jaslake did a great job avoiding the clipboard.

    On Excel 2003 (I know you have 2010), Application.CutCopyMode works for me. I was able to come up with another routine courtesy of Chip Pearson (please note api declarations missing from routine, but are included in the test routine below):
    Please Login or Register  to view this content.
    The following is a test program program that attempts to clear the Clipboard buffer using both:
    a. Application.CutCopyMode = False
    b. LJMEmptyClipBoard

    The routine requires 'Microsoft Forms 2.0 Object Library'
    'In VBA Tools -> References -> Microsoft Forms 2.0 Object Library
    'or you will get a "Compile error: user-defined type not defined"

    Please note that the Win64 api declarations have not been tested and if any are incorrect, I would appreciate knowing what the correct declarations should be.
    Please Login or Register  to view this content.
    Lewis
    Last edited by LJMetzger; 04-20-2014 at 03:17 PM.

  4. #4
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Looking for workarounds for CopyCutMode

    jaslake - your solution is simple and slick. Thank you so much.


    LJMetzger / Lewis - Thank you for your recommendation. I will try your approach a little later.

  5. #5
    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: Looking for workarounds for CopyCutMode

    You're welcome...glad I could help. Thanks for the Rep.

+ 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: 1
    Last Post: 08-24-2012, 02:36 PM
  2. VBA maximum line length and workarounds
    By knewbry in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2012, 10:41 PM
  3. Protecting Code Against Workarounds
    By hriggs in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-06-2009, 06:08 AM
  4. 26 IF workarounds
    By corinereyes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2007, 09:56 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