Results 1 to 3 of 3

Thread: Problem with cut/copy/paste [resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    the UK
    Posts
    265

    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
    Last edited by simonp; Apr 22nd, 2004 at 11:46 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width