Paste Method

       

Copies data from the system Clipboard to an OLE container control.

Syntax

object.Paste

The object is an object expression that evaluates to an object in the Applies To list

Remarks

To use this method, set the OLETypeAllowed property, and then check the value of the PasteOK property. You can't paste successfully unless PasteOK returns a value of True.

If the Paste method was carried out, the OLEType property is set to vbOLELinked (0) or vbOLEEmbedded (1). If the Paste method wasn't carried out, the OLEType property is set to vbOLENone (3).

You can use this method to support an Edit Paste command on a menu.

If the PasteOK property setting is True and Visual Basic can't paste the object, the OLE container control deletes any object already in the control.