Results 1 to 4 of 4

Thread: What are the codes for "Cut. Copy and Paste"?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195
    anyone know?

  2. #2
    Lively Member
    Join Date
    Jul 1999
    Posts
    87
    Use Clipboard functions like this:

    Code:
    Clipboard.GetText 'Gets the text saved to clipboard
    Clipboard.SetText 'Sets text to save to clipboard
    
    'Below are to Functions you can use
    
    Public Function Paste() As String
        Dim sTemp As String         'Create a Temp String
        
        sTemp = Clipboard.GetText   'Temp String = Clipboard Text
        Paste = sTemp               'Paste Function = Temp String
    End Function
    
    Public Function Copy(sString As String)
        Clipboard.SetText sString   'Set Clipboard Text to sString
    End Function
    
    'When using 'Cut' You just Remove the String you copied
    Hope this helps you.

    Thank you, Jerry.

    Homepage: http://fraxionsoftware.cjb.net
    ICQ: 40269591
    Mail: Contact Me

  3. #3
    Guest
    If you're talking about TextBoxes, then you can use the SelText property.
    Code:
    'Paste
    Text1.SelText = Clipboard.GetText
    
    'Copy
    Clipboard.SetText Text1.SelText
    
    'Cut
    Clipboard.SetText Text1.SelText
    Text1.SelText = ""

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Sometimes just the ClipBoard.SetText doesn't work if there's already some text in it, so I recommend:

    Code:
    ClipBoard.Clear 'clear everything that's already there
    ClipBoard.SetText "HEY!"
    have fun though
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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