Problem with cut/copy/paste [resolved]
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 Sub
Code:
Private Sub mnuCut_Click()
If TypeOf Screen.ActiveControl Is TextBox Then
Clipboard.SetText Screen.ActiveControl.SelText
Screen.ActiveControl.SelText = Chr(0)
End If
End Sub
Code:
Private Sub mnuPaste_Click()
If TypeOf Screen.ActiveControl Is TextBox Then
Screen.ActiveControl.SelText = Clipboard.GetText
End If
End Sub
but 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?!
Any ideas why this might be happening?
Simon