Fix for "Clipboard Error. We couldn't copy the content of the clipboard"

Anonymous
2024-04-29T02:20:04+00:00

There have been many posts on how to fix the message Clipboard Error. We couldn't copy the content to the clipboard because its in use by another application.

I tried many of the suggestions:

  • Turn off live preview
  • Clear the clipboard
  • Reboot
  • Repair Excel
  • Add special folders to the Windows directory.
  • Issue the command prompt 'Echo Off | clip
  • Use the statement "Application.CutCopyMode = False after doing a copy and before closing a file
  • Copying one cell before closing a file
  • Removing com add-ins
  • Closing all other applications
  • And a score of others

None worked. I have a test macro that works for several minutes and does many copy/paste, graphics, formatting, etc. It would display the clipboard error at least once every 2 or 3 executions, and often every execution. I used it to test all the posted cures.

What I finally realized is that the application that was using the clipboard and causing the error was Excel itself. Excel was basically not able to keep up with the command to clear the clipboard.

The cure then became simple. Slow excel down by using the statement "DoEvents" right after I issued the command "Application.CutCopyMode = False". And to put the Application.CutCopyMode = False after I was finished with any copy that I did and right before any workbook close command. I've run my macro 10 times and no clipboard error message appears.

Please give it a try.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

42 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2025-06-09T15:38:18+00:00

    For me, it was Slac that was holding the copy functionality up.

    What's disturbing is that I hardly ever use Slac.

    Now that program gets to live in the bit bucket. :-)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-06-05T22:23:47+00:00

    This fixed my issue. I had already tried the "Application.CutCopyMode = False" after every Paste or after any Cut that wasn't going to be Pasted, but still would get the Clipboard error every so often in a macro that does A LOT of work. Adding the DoEvents fixed it. And I do use Logitech Options, as do others that use my Excel tools.

    For those where the DoEvents isn't enough, maybe add a loop and check the CutCopyMode. If it's not False (it can be False, xlCopy, or xlCut), keep doing a DoEvent (though definitely set a Timeout of some type if you do this). If you go that far, a subroutine is really the only option, so here it is:

    Public Sub ClearClipboardIssue(Optional dMaxTime As Double = 2)
    
        Dim dStart As Double, dTimer As Double
    
        dStart = Timer
    
        Do
    
            Application.CutCopyMode = False
    
            DoEvents
    
            If Application.CutCopyMode = False Then Exit Do
    
            dTimer = Timer
    
            If dTimer < dStart Then dTimer = dTimer + 86400 ' Watch for WRAP at MIDNIGHT!
    
            If dTimer - dStart >= dMaxTime Then Exit Do ' Give up and accept the warning. It's 
                                                        '  annoying, but doesn't break anything!
    
        Loop
    
    End Sub
    

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2025-06-02T21:24:45+00:00

    June 2025 and I'm having the copying error. I uninstalled Logi Options+ that was installed a week ago and no more error message. So annoying.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2025-06-02T18:40:19+00:00

    Since this doesn't happen in the 32-bit version it borders on fraud by Microsoft. They take no responsibility for fixing the bugs in their programs. They let us slog it out in forums with halfassed work arounds. This problm is over a year old. Then again, they've had a problem with the Excel screen refusing to update after locking titles for about 15 or 20 years (not a joke).

    Speaking of halfassed work-arounds, instead of a DoEvent, I use a simpler soulution: I build in a defined wait. It's a single line and isn't affected by any load on the processor. I you're tryig to run something else at the same time a Do Loop can bog down.

    Application.Wait Now + #12:00:03 AM#    'allow screen to catch up 
    

    That's a 3 second pause. Change the last digits to add/subtract seconds. I started using it when VBA would execute commands before data finished loading ito a file. It's not very useful to tell it to perform a sort on data that's not actually loaded yet. I also use it when I want to temporarily display a message to the user about what the macro is going to do next. It's easy to adjust to determine the abslute minimum time needed to keep your macros from crashing in on themselves.

    Was this answer helpful?

    0 comments No comments