StartDrag method (Microsoft Forms)

Initiates a drag-and-drop operation for a DataObject.

Syntax

fmDropEffect=Object. StartDrag ([Effect as fmDropEffect])

The StartDrag method syntax has these parts:

Part Description
Object Required. A valid object.
Effect Optional. Effect of the drop operation on the target control.

Settings

The settings for Effect are:

Constant Value Description
fmDropEffectNone 0 Does not copy or move the drop source to the drop target.
fmDropEffectCopy 1 Copies the drop source to the drop target.
fmDropEffectMove 2 Moves the drop source to the drop target.
fmDropEffectCopyOrMove 3 Copies or moves the drop source to the drop target.

Remarks

The drag action starts at the current mouse pointer position with the current keyboard state and ends when the user releases the mouse. The effect of the drag-and-drop operation depends on the effect chosen for the drop target.

For example, a control's MouseMove event might include the StartDrag method. When the user clicks the control and moves the mouse, the mouse pointer changes to indicate whether Effect is valid for the drop target.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.