View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech[_2_] Jim Rech[_2_] is offline
external usenet poster
 
Posts: 533
Default UserForm - Right-click a Textbox and Paste

The problem seems to be that userform textboxes do not have context menus in
run mode, and userforms do not support menus of any sort in run mode.

If you want a right click on a text box to do a paste without benefit of a
menu it could be as simple as:

Private Sub TextBox1_MouseUp(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
If Button = 2 Then ''Right mouse button
SendKeys "^v"
End If
End Sub


--
Jim
"PCLIVE" wrote in message
...
In a UserForm TextBox, is there a way to allow right-clicking? For
example, I'd like to be able to right-click inside of a textbox and get
the menu option to Paste. I know I can use Ctrl+v, but I'd like to know
if it can be done completely from the mouse.

Thanks,
Paul

--