Can not open clipboard

West Man

Well-known Member
Joined
Mar 27, 2006
Messages
1,175
I have a spreadsheet that will not allow me to copy. I get the message "Can not open clipboard". This occured shortlt after the message that Excel does not have enough memory to complete the operation. I was dragging a formula down a few thousand cells.

I have tried exiting Excel and bringing up the spreadsheet again. I have also tried restarting the computer. All to no avail. The spreadsheet does not contain any macros.

Any ideas?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Upon trying to save I get the message that the picture is too large and will be truncated. No picture is in the sheet, at least not intentionally.
 
Upvote 0
Try running this

Code:
Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function EmptyClipboard Lib "user32" () As Long
Public Declare Function CloseClipboard Lib "user32" () As Long

Sub ClearClipboard()
    OpenClipboard (0&)
    EmptyClipboard
    CloseClipboard
End Sub
 
Upvote 0
Thanks for the tips. After getting numerous different error messages, some quite unusual, I received a corrupted file message which is likely the real problem. Because I could reconstruct the spreadsheet fairly easily, I went that route rather than fighting it. Sometimes you have to know when to throw in the towel.
 
Upvote 0
Try running this

Code:
Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function EmptyClipboard Lib "user32" () As Long
Public Declare Function CloseClipboard Lib "user32" () As Long

Sub ClearClipboard()
    OpenClipboard (0&)
    EmptyClipboard
    CloseClipboard
End Sub

I am having the same issue, but for different reasons. I am actually copying a large amount of data to the clipboard. I have also seen another variation of this code. I will let you know if it works for me.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top