
Cut, paste, copy questions...
This is easily done. Make a Sub for each function for example for the Copy
procedure:
Sub CopyToClipBrd(txtText As TextBox)
If txtText.SelText = "" Then
Exit Sub
Else
Clipboard.Clear
Clipboard.SetText txtText.SelText
End If
End If
Then you can call it like this:
CopyToClipBrd Text1
And it'll do exactly what you want it to.
--
Sincerely,
Thomas Daugaard
Visit my domain at http://www.tdaugaard.dk/
ICQ me on 48525216
Quote:
> Okay.. i can get cut, paste, and copy to work, but only for specific
> text boxes and such.. using:
> 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
> But i need the three options to work everywhere in my program, in every
> text box.. a generic version if you will.. any ideas?? Thanks
> Moebius