kencushing
New Member
- Joined
- Apr 7, 2006
- Messages
- 8
I have some simple code that I found on the web that populates the clipboard with whatever text you specify.
The problem is that VBA for Excel is not recognizing the DataObject data type.
Is there a Reference that I need to add? Or what am I doing wrong?
The sample code is below.
Sub PutInClip(sTags As String)
Dim doObject As DataObject
Set doObject = New DataObject
doObject.SetText sTags
doObject.PutInClipboard
End Sub
The problem is that VBA for Excel is not recognizing the DataObject data type.
Is there a Reference that I need to add? Or what am I doing wrong?
The sample code is below.
Sub PutInClip(sTags As String)
Dim doObject As DataObject
Set doObject = New DataObject
doObject.SetText sTags
doObject.PutInClipboard
End Sub