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. In Windows 95, right-clicking any text box brings up a context menu with basic edit commands on it. If you want to change this menu, put the following code in the MouseDown event of the text box. |