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.

See also  How to Create and Deploy QR Codes Online: A Comprehensive Guide

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist