COPY, CUT, PASTE Source code on how to do it EASY

By | 2002-06-01

This Code shows you how to copy, cut, and paste with only a few lines this is very easy to do. This is the CODE and not just some garbage like those other copy, paste, and cut. AND IT WORKS!!!

Original Author: Travis Gerry

Assumptions

You need to know the basics of Visual Basic Programing, and thats it

Code

' You need a menu with 3 options, cut, copy, paste. Make sure to name them
' mnucut, mnucopy, mnupaste. Or just make 3 buttons and change the code a bit.
' You need one text box, defualt name text1. And thats it.
Private Sub mnucopy_Click()
If Text1.SelText = "" Then
  Exit Sub
Else
  Clipboard.Clear
  Clipboard.SetText Text1.SelText
End If
End Sub
Private Sub mnucut_Click()
If Text1.SelText = "" Then
  Exit Sub
Else
  Clipboard.Clear
  Clipboard.SetText Text1.SelText
  Text1.SelText = ""
End If
End Sub
Private Sub mnupaste_Click()
Text1.SelText = Clipboard.GetText

End Sub

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.