PC Review


Reply
Thread Tools Rate Thread

DataObject in Access?

 
 
Bob Bridges
Guest
Posts: n/a
 
      20th Jan 2010
I'm trying to modify some already-existing VBA/Access code to put some text
in the clipboard. Now, in Excel I just create a DataObject and use its
built-in methods SetText and PutInClipboard; it's very simple. But when I
try that in Access, I can't seem to create the object. Is there something
obvious I'm missing? The appropriate object library is checked, and the VBA
editor is properly capitalized "dataobject", so apparently it can see it.
Yet I'm not allowed to "Dim cb As New DataObject" nor to "Set cb = New
DataObject"; it says I'm not allowed to use "New" in that context, though it
works fine in Excel. What secret words must I utter to get it to work?
Anyone know?
 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      20th Jan 2010
On Tue, 19 Jan 2010 21:33:01 -0800, Bob Bridges
<(E-Mail Removed)> wrote:

I'm not sure - you kept the library name secret which makes it
difficult for us to help you.
Here is an alternative method (actually, two):
http://www.mvps.org/access/api/api0049.htm

-Tom.
Microsoft Access MVP


>I'm trying to modify some already-existing VBA/Access code to put some text
>in the clipboard. Now, in Excel I just create a DataObject and use its
>built-in methods SetText and PutInClipboard; it's very simple. But when I
>try that in Access, I can't seem to create the object. Is there something
>obvious I'm missing? The appropriate object library is checked, and the VBA
>editor is properly capitalized "dataobject", so apparently it can see it.
>Yet I'm not allowed to "Dim cb As New DataObject" nor to "Set cb = New
>DataObject"; it says I'm not allowed to use "New" in that context, though it
>works fine in Excel. What secret words must I utter to get it to work?
>Anyone know?

 
Reply With Quote
 
Daniel Pineault
Guest
Posts: n/a
 
      20th Jan 2010
see http://www.mvps.org/access/api/api0049.htm
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Bob Bridges" wrote:

> I'm trying to modify some already-existing VBA/Access code to put some text
> in the clipboard. Now, in Excel I just create a DataObject and use its
> built-in methods SetText and PutInClipboard; it's very simple. But when I
> try that in Access, I can't seem to create the object. Is there something
> obvious I'm missing? The appropriate object library is checked, and the VBA
> editor is properly capitalized "dataobject", so apparently it can see it.
> Yet I'm not allowed to "Dim cb As New DataObject" nor to "Set cb = New
> DataObject"; it says I'm not allowed to use "New" in that context, though it
> works fine in Excel. What secret words must I utter to get it to work?
> Anyone know?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataObject - reference to add? Al Microsoft Access VBA Modules 1 24th Apr 2008 03:50 AM
DataObject =?Utf-8?B?U2hlaWxh?= Microsoft Excel Programming 1 20th Oct 2006 08:20 PM
DataObject and cliboard D.2 Microsoft Excel Programming 5 22nd Jan 2005 08:00 PM
How to serialize a dataObject Jinlin Microsoft C# .NET 1 7th May 2004 04:15 PM
Can't Dim As DataObject?? Ed Microsoft Excel Programming 3 12th Jan 2004 09:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:53 AM.