Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Copy selection to clipboard


Sub  CopyToClipboard()
Clipboard.Clear
If txtVisible.SelLength = 0 Then
   Clipboard.SetText txtVisible.Text
Else
   Clipboard.SetText txtVisible.SelText
End If
End Sub