Clear Excel Clipboard with VBA

  • Thread starter Thread starter Barb Reinhardt
  • Start date Start date
B

Barb Reinhardt

I'm trying to clear the Excel clipboard with VBA. I've tried this

Application.CutCopyMode = False

And it doesn't clear it. What am I doing wrong?

Thanks,
Barb Reinhardt
 
Declare Function CloseClipboard Lib "user32" () As Long
Declare Function EmptyClipboard Lib "user32" () As Long
Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long

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