ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DataObject and cliboard (https://www.excelbanter.com/excel-programming/321399-dataobject-cliboard.html)

D.2

DataObject and cliboard
 
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.

keepITcool

DataObject and cliboard
 

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 :

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.


D.2

DataObject and cliboard
 

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...

D.2

DataObject and cliboard
 
Thank you !

Tom Ogilvy

DataObject and cliboard
 
You can also get added information at Chip Pearson's site
http://www.cpearson.com/excel/clipboar.htm

--
Regards,
Tom Ogilvy

"keepITcool" wrote in message
ft.com...

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 :

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.




D.2

DataObject and cliboard
 

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



thank you


All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com