View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Myrna Larson Myrna Larson is offline
external usenet poster
 
Posts: 863
Default clearing the office clipboard in vba

I would go to the VB Editor, then F2 to open the object browser, and search
for DataObject to see which library contains this object. In XL2000 it's in
the MSForms library, and you may need to set a reference to its counterpart in
XL2003.

On 4 Nov 2004 19:16:49 -0800, (ste mac) wrote:

Hi, sorry l don't know (l have 2k) perhaps you could give Chip a shout
or visit his website...anyone else?

When I try and run this code I receive a User-defined type not defined

ERROR
how do I set MyDataObj in Excel2003



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