Search code examples
excelvbatextboxdragdrop

how can I drag text from one a textbox to another textbox in a userform


I have 20 textboxes in a userform and I want to move the text from textbox1 to textbox5 by dragging and dropping it with the mouse, but I really have no idea how to do this. I am not an experienced programmer in VBA so maybe it is not even possible


Solution

  • No VBA required! It is simple than you think :)

    Set the DragBehavior of the TextBox to fmDragBehaviorEnabled at design time as shown below and you are done

    enter image description here

    In Action

    enter image description here