This is very basic just to get you started. There's a lot more you will
probably want to do, also slightly different approaches -
'' put some text in Textbox1
'' press left button and hold Ctrl with mouse over Textbox1
'' drag and release over Textbox2
Private msText As String
Private Sub TextBox1_BeforeDragOver( _
ByVal Cancel As MSForms.ReturnBoolean, _
ByVal Data As MSForms.DataObject, _
ByVal X As Single, ByVal Y As Single, _
ByVal DragState As MSForms.fmDragState, _
ByVal Effect As MSForms.ReturnEffect, ByVal Shift As
Integer)
Cancel = True
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
If Button = 1 And Shift = 2 Then
Set dataObj = New MSForms.DataObject
msText = TextBox1.Text
dataObj.StartDrag
End If
End Sub
Private Sub TextBox1_MouseUp(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
msText = ""
End Sub
Private Sub TextBox2_BeforeDragOver( _
ByVal Cancel As MSForms.ReturnBoolean, _
ByVal Data As MSForms.DataObject, _
ByVal X As Single, ByVal Y As Single, _
ByVal DragState As MSForms.fmDragState, _
ByVal Effect As MSForms.ReturnEffect, _
ByVal Shift As Integer)
Cancel = True
End Sub
Private Sub TextBox2_BeforeDropOrPaste( _
ByVal Cancel As MSForms.ReturnBoolean, _
ByVal Action As MSForms.fmAction, _
ByVal Data As MSForms.DataObject, _
ByVal X As Single, ByVal Y As Single, _
ByVal Effect As MSForms.ReturnEffect, _
ByVal Shift As Integer)
TextBox2.Text = msText
End Sub
Regards,
Peter T