Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have assigned a "cell' menu to a textbox (in a userform) under the dblclick event in order to copy and paste from and to the textbox. The problem is that the pasted information is going to the active cell in the worksheet instead of the userform's textbox. Why there is no right click event for a textbox? and how can i paste the information straight to the textbox? Thanks in advance to your suggestion Eli |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have assigned a "cell' menu to a textbox (in a userform) under the
dblclick event in order to copy and paste from and to the textbox. The problem is that the pasted information is going to the active cell in the worksheet instead of the userform's textbox. Why there is no right click event for a textbox? and how can i paste the information straight to the textbox? While there is no "Right Click" event for a TextBox on a UserForm, you can make use of the MouseDown or MouseUp events to see if the Right or Left mouse buttons were pressed and put code in these tests to react to the appropriate mouse button click. Here is a simple example to show this... Private Sub TextBox1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, _ ByVal X As Single, ByVal Y As Single) If Button = xlSecondaryButton Then MsgBox "RIGHT mouse button was pressed" ElseIf Button = xlPrimaryButton Then MsgBox "LEFT mouse button was pressed" End If End Sub Rick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Eli,
An example here http://cjoint.com/?hcqjbyrlKZ Regards MP "???" a crit dans le message de news: ... Hi I have assigned a "cell' menu to a textbox (in a userform) under the dblclick event in order to copy and paste from and to the textbox. The problem is that the pasted information is going to the active cell in the worksheet instead of the userform's textbox. Why there is no right click event for a textbox? and how can i paste the information straight to the textbox? Thanks in advance to your suggestion Eli |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rick and Michel
Thanks for your help, it works like a dream. Eli "Michel Pierron" wrote: Hi Eli, An example here http://cjoint.com/?hcqjbyrlKZ Regards MP "???" a écrit dans le message de news: ... Hi I have assigned a "cell' menu to a textbox (in a userform) under the dblclick event in order to copy and paste from and to the textbox. The problem is that the pasted information is going to the active cell in the worksheet instead of the userform's textbox. Why there is no right click event for a textbox? and how can i paste the information straight to the textbox? Thanks in advance to your suggestion Eli |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding items to a right click menu | Excel Programming | |||
adding an option to the right click menu | Excel Discussion (Misc queries) | |||
adding an option in the right click menu | Excel Discussion (Misc queries) | |||
Adding a menu item right click menu when clicking on a single. | Excel Programming | |||
Adding menu to the mouse right click pop-up menu | Excel Programming |