Excel Right-Click Context Menu On Userform Textbox

Right Click Menu On Userform Textbox


            Popup menu on textbox control is created using class module.The menu can be activated from the MouseUp event of the textbox:
Private WithEvents TControl As MSForms.TextBox
Private Sub TControl_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
   If Button = 2 And Shift = 0 Then
     Run "RightClickMenuTextBox"
   End If
End Sub

These operations can be performed with the right click menu :
Copy
 Paste
☑ Cut
☑ Clear
☑ Telephone



2 comments: