View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Clear Clipboard no longer works

From Chip Pearson's site:
http://cpearson.com/excel/clipboar.htm

Because these procedures use the DataObject variable type, you must have a
reference set in your VBA project to the Microsoft Forms 2.0 object library.


David Henderson wrote:

Please can someone put me right, I have a function to clear the clipboard,
but if I copy it into a new spreadsheet it comes up with an error, "User
Defined Type not Defined"
here is the function
Function ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Function
Why?
Thanks in advance
David


--

Dave Peterson