Fix 'Cannot empty the Clipboard' Error in Excel When Copy-Pasting

beginnerπŸ“Š Microsoft Excel2026-05-20| Microsoft Excel 2016/2019/2021/365, Windows 10/11, Remote Desktop (RDP) sessions

Error Message

Cannot empty the Clipboard. Another program might be using the Clipboard.
#excel#clipboard#copy-paste#windows#rdp

The Error

You copy a cell in Excel and a popup immediately interrupts you:

Cannot empty the Clipboard. Another program might be using the Clipboard.

Click OK β€” it disappears. Copy again β€” it's back. Every. Single. Time.

The copy actually succeeds, so the data lands wherever you paste it. But that constant dialog kills your flow, especially during bulk edits or macro runs. RDP sessions are the worst offenders, though the error also appears regularly when Teams, Skype, or another Office app is open in the background.

Root Cause

Windows Clipboard is a shared system resource. Before Excel can write new data to it, Excel tries to clear whatever is there first. The error fires when another process holds an open handle on the clipboard at that exact moment β€” blocking Excel's clear operation.

The usual suspects:

  • RDP clipboard redirection β€” rdpclip.exe bridges clipboard events between your local machine and the remote session; it grabs the clipboard handle frequently
  • Microsoft Teams / Skype β€” both apps watch clipboard contents to generate link previews
  • Other Office apps β€” Word or Outlook holding clipboard data via the "keep data for pasting" feature
  • Excel's own Office Clipboard β€” the multi-item pane (up to 24 items) can conflict with the system clipboard
  • Third-party clipboard managers β€” Ditto, ClipboardFusion, or similar tools
  • Antivirus real-time scanning β€” some engines intercept clipboard writes to scan for malicious content

Quick Fix (Immediate Relief)

1. Clear the Office Clipboard

Excel has its own clipboard, separate from Windows. It holds up to 24 copied items and can conflict with the system clipboard when it fills up.

  • Go to Home tab β†’ Clipboard group β†’ click the small dialog launcher arrow (bottom-right corner of the group)
  • In the Clipboard pane, click Clear All
  • Close the pane and try copying again

This alone resolves the error for many users on local machines.

2. Suppress the Popup via Excel Options

This hides the error dialog without addressing the root cause β€” a valid workaround when you're in the middle of urgent work:

  • Go to File β†’ Options β†’ Advanced
  • Scroll to the Cut, copy, and paste section
  • Uncheck "Show Paste Options button when content is pasted"
  • Also uncheck "Show Insert Options buttons"
  • Click OK

The copy still works. You just won't see the popup anymore.

Fix for RDP Sessions

Running Excel inside a Remote Desktop session? Then rdpclip.exe is almost certainly the cause. Restarting it takes about 10 seconds and fixes the issue immediately.

Restart rdpclip.exe

Inside the RDP session, open Task Manager or run these commands in Command Prompt:

taskkill /f /im rdpclip.exe
rdpclip.exe

Or use PowerShell:

Stop-Process -Name rdpclip -Force
Start-Process rdpclip

This resets the clipboard bridge between your local machine and the remote session. The downside: you'll need to repeat this each time you reconnect.

Automate the Fix with a Logon Script

If you reconnect to the same RDP server daily, a logon script removes the manual step. Create fix-clipboard.bat with this content:

@echo off
taskkill /f /im rdpclip.exe >nul 2>&1
start rdpclip.exe

Deploy it one of two ways:

  • Group Policy: User Configuration β†’ Windows Settings β†’ Scripts (Logon/Logoff) β†’ add the .bat file
  • Startup folder: Drop it in %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup

After the next login, rdpclip.exe restarts automatically before you even open Excel.

Permanent Fix (Find and Remove the Locking Process)

Step 1: Identify what is holding the clipboard

Guessing is slow. Use this PowerShell snippet to get the exact process name and PID β€” run it immediately after the error appears:

Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;
public class ClipboardOwner {
    [DllImport("user32.dll")] public static extern IntPtr GetOpenClipboardWindow();
    [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
}
"@

$hwnd = [ClipboardOwner]::GetOpenClipboardWindow()
if ($hwnd -ne [IntPtr]::Zero) {
    $pid = 0
    [ClipboardOwner]::GetWindowThreadProcessId($hwnd, [ref]$pid) | Out-Null
    Get-Process -Id $pid | Select-Object Name, Id, Description
} else {
    Write-Output "No process currently has the clipboard open."
}

Typical output: Teams 12348 Microsoft Teams β€” now you know exactly what to target.

Alternatively, Process Explorer from Sysinternals shows clipboard handles under Find β†’ Find Handle or DLL.

Step 2: Kill or reconfigure the offending app

  • Teams/Skype: In Teams, go to Settings β†’ General β†’ uncheck clipboard-related options, or kill it temporarily: taskkill /f /im Teams.exe
  • Clipboard managers: Pause or exit the app while working in Excel. Ditto, for example, has a "Pause" option in its system tray icon
  • Antivirus: Add Excel.exe as an exclusion for clipboard scanning β€” check your vendor's documentation for the exact setting
  • Word/Outlook: Open the Clipboard pane β†’ click Options at the bottom β†’ uncheck "Collect Without Showing Office Clipboard"

Step 3: Disable clipboard sharing in RDP if you don't need it

No need to copy-paste between your local machine and the remote server? Turn off clipboard redirection entirely β€” it eliminates rdpclip.exe conflicts at the source.

Before connecting, open Remote Desktop Connection (mstsc.exe):

  • Click Show Options β†’ Local Resources tab
  • Under Local devices and resources, click More…
  • Uncheck Clipboard

To persist this setting, save your RDP configuration to a .rdp file and add this line:

redirectclipboard:i:0

Open that .rdp file instead of typing the server address each time.

VBA Workaround for Developers

Macros that copy cells in a loop β€” say, iterating through 500 rows and copying each to another sheet β€” will trigger this error on nearly every iteration. Two lines fix it.

Sub ClearClipboardSafe()
    On Error Resume Next
    Application.CutCopyMode = False  ' Releases Excel's copy mode and the marching ants border
    On Error GoTo 0
End Sub

Call ClearClipboardSafe after each copy operation inside your loop. The key line is Application.CutCopyMode = False β€” it tells Excel to release the clipboard immediately rather than holding it open while the dashed border stays active.

If your macro needs to clear the Windows clipboard too (not just Excel's), add this after the CutCopyMode line:

CreateObject("htmlfile").ParentWindow.ClipboardData.ClearData()

This uses late binding (no extra references needed) and works across Excel 2016 through 365.

Verification

After applying a fix, run through these checks:

  • Select a range and press Ctrl+C β€” the popup should not appear
  • Copy 10+ cells in quick succession β€” the error should stay gone
  • In an RDP session, copy data from Excel and paste into a local app (Notepad works) β€” clipboard redirection should work silently
  • Run the PowerShell clipboard owner script again β€” expected output: No process currently has the clipboard open.

Summary

  • RDP session: Restart rdpclip.exe β€” resolves ~80% of cases in under 30 seconds
  • Local machine: Run the PowerShell snippet to find the locking process, then kill or reconfigure it
  • Quick suppression: Clear the Office Clipboard pane, or uncheck paste options in Excel's Advanced settings
  • Macros: Add Application.CutCopyMode = False after each copy operation in your loop

Related Error Notes