DataObject and cliboard

D

D.2

Hello,

I tryed to use those lines:

With New DataObject
..SetText "my text"
..PutInClipboard
End With

It's suppose tu put a text in the clipboard

The point is that vba said "DataObject" is a type not defined

What is needed to make excel accept this DataObject.
The VBA-HELP uses it "as it" without any comment about that.

Please help.
Thank you.
 
K

keepITcool

DeeToo,

Actually it's a member of msforms library, not from native vba.

you can use it without a userform but you'll need a reference
to Microsoft Forms Object Library. The reference is automatically added
to a workbook when you insert a Userform from VBeditor's Insert menu.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


D.2 wrote :
 
D

D.2

Actually it's a member of msforms library, not from native vba.

you'll need a reference to Microsoft Forms Object Library. The reference is automatically added
to a workbook when you insert a Userform from VBeditor's Insert menu.

Ok, cool

I added a userform then deleted it just after.
But the reference stay !

Hard to know when you just reed the VBA Help ! this seems to be a
"regular" VBA stuff...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top