+ Reply to Thread
Results 1 to 2 of 2

DataObject object

  1. #1
    Registered User
    Join Date
    01-17-2005
    Posts
    1

    DataObject object

    Hi to all,

    I am new to the forum and I am starting to do some vba programming for Excel. I have an Excel 2002 Sp-2 and I am having troubles with the DataObject object type.

    I need to copy a cell content to the clipboard and bring it back with a DataObject object (with the DataObject.GetText method) so that I can count the occurrence of a given charachter within that text.

    Problem is that while the vba help shows me the DataObject declaration, Excel gives me an error telling me that there is no DataObject type defined and that I need to define it as a user-defined type.

    Can anybody help me with that?

    Giulio

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Quote Originally Posted by Giulmo
    Hi to all,

    I am new to the forum and I am starting to do some vba programming for Excel. I have an Excel 2002 Sp-2 and I am having troubles with the DataObject object type.

    I need to copy a cell content to the clipboard and bring it back with a DataObject object (with the DataObject.GetText method) so that I can count the occurrence of a given charachter within that text.

    Problem is that while the vba help shows me the DataObject declaration, Excel gives me an error telling me that there is no DataObject type defined and that I need to define it as a user-defined type.

    Can anybody help me with that?

    Giulio

    Hello Giulmo,

    I would suspect that the object library has not been registered. An object and it's properties can show up in VBA and still not be registered. Go to the Visual Basic Editor and select "Tools" from the menu. Select References. This will display a box with the object libraries available. Go through and see if the ADO and DAO object libraries are loaded. There is a check box next to each reference.

    Good Luck,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1