Allow copy/paste in a textbox

Solved
cyrga11 Posted messages 48 Status Member -  
cyrga11 Posted messages 48 Status Member -
Hello,

I've searched everywhere, but I can't find what I'm looking for. So, I have a UserForm with 8 TextBoxes.

In each of these TextBoxes, I need to enter information from a document. I would like to be able to copy/paste with the mouse for each piece of information and right-click to paste it into the corresponding TextBox.

So, I right-click/copy to take the information from the document
and I right-click/paste to put the information into the TextBox.

I've read that by default, TextBoxes accept copy/paste, but it only works with Ctrl+v, and I would like to have it available with the mouse if possible.

Thank you very much in any case :)

Configuration: Windows 7 / Firefox 33.0

2 answers

  1. Mytå Posted messages 4246 Registration date   Status Contributor Last intervention   957
     
    Hello Forum

    You can decide that the right mouse button is used for pasting.
     Private Sub TextBox1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) If Button = vbKeyRButton Then ActiveControl.Paste End Sub 

    Mytå
    --
    Thank you for following up on your question, we are not robots...
    “If debugging is the art of removing bugs, then programming must be the art of creating them.”
    2
  2. cyrga11 Posted messages 48 Status Member
     
    Formidable Mytå, it works great, thank you very much. :D
    0