Here is a technique posted by John Green last year
A short cut menu can be created as a popup commandbar. The menu can be
activated from the MouseUp event of the textbox.
You can create a popup menu using code like the following in a standard
module.
--------------------------------------------------------------------------
Sub MakePopUp()
'Remove any old instance of MyPopUp
On Error Resume Next
CommandBars("MyPopUp").Delete
On Error GoTo 0
With CommandBars.Add(Name:="MyPopUp", Position:=msoBarPopup)
With .Controls.Add(Type:=msoControlButton)
.OnAction = "ShowDataForm"
.FaceId = 264
.Caption = "Data Form"
End With
With .Controls.Add(Type:=msoControlButton)
.OnAction = "Sort"
.FaceId = 210
.Caption = "Sort Ascending"
End With
End With
End Sub
Sub ShowDataForm()
MsgBox "DataForm"
End Sub
Sub Sort()
MsgBox "Sort"
End Sub
----------------------------------------------------------------------
In your userform code module choose the Textbox from the top left dropdown
and the MouseUp event from the top right dropdown and insert something like
the following code:
----------------------------------------------------------------------------
Private Sub TextBox1_MouseUp(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
If Button = 2 Then
Application.CommandBars("MyPopUp").ShowPopup
End If
End Sub
---------------------------------------------------------------------------
--
HTH
RP
(remove nothere from the email address if mailing direct)