clear the clipboard?

S

scottnshelly

Hey,
i need to have a code that will empty my clipboard. any suggestions?
i got as far as application.clipboardformats....
Thank
 
V

Vasant Nanavati

From Chip Pearson:

http://www.cpearson.com/excel/clipboar.htm

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

If you just want to clear the clipboard of stuff that you've put there using
Excel's Copy function, you can simply use:

Application.CutCopyMode = False
 
Top