|
If Button = vbRightButton Then
Text1.Enabled = False Text1.Enabled = True Text1.SetFocus PopUpMenu Menu1 End If 'where Text1 is the text box and Menu1 is the pop-up menu. 'Disabling and re-enabling the control causes Windows to 'lose the MouseDown message, SetFocus tidies things up a 'bit, and PopUpMenu shows the menu. 'Left clicks will work as always, allowing the user to 'edit the text in the text box. |