Hello,
I'm using this code to work cut, copy and paste from the menu bar:
Code:Private Sub mnuCopy_Click() If TypeOf Screen.ActiveControl Is TextBox Then Clipboard.SetText Screen.ActiveControl.SelText End If End SubCode:Private Sub mnuCut_Click() If TypeOf Screen.ActiveControl Is TextBox Then Clipboard.SetText Screen.ActiveControl.SelText Screen.ActiveControl.SelText = Chr(0) End If End Subbut if I right-click in a text box - it seems to work independantly from the routine I have above. It's as if there were two clipboards?!Code:Private Sub mnuPaste_Click() If TypeOf Screen.ActiveControl Is TextBox Then Screen.ActiveControl.SelText = Clipboard.GetText End If End Sub
Any ideas why this might be happening?
Simon


Reply With Quote