DataObject Object

DataObject Object

In an event, I declared a dataobjectvariable and instantiated it this way :

     Dim do_1 as dataobject          Set do_1= New dataobject

But when I run the program I get thiserror: “Invalid use of ‘new’ keyword”Why is this happening?

The dataObject is a container to transfer data from a component source to a component target during OLE drag and drop events. Therefore, this object cannot be created in your code. It is only passed to OLE Drag and Drop procedures like OLEDragDrop, OLEStartDrag, OLEDragOver, and OLESetData.


Share the Post: