Tools Links Login

Copy a listbox to clipboard

Have you ever tried to the contents a listbox to the clipboard? Annoying, huh? Well this code can help! This will copy all the contents in a listbox and put ", " between each one

Original Author: Joey Schoblaska

Code

'Add a textbox, a listbox, and a command button
'Put this code in the command button
Clipboard.SetText ""
Text1.Text = ""
For X = 0 To List1.ListCount - 1
Text1.Text = Text1.Text & List1.List(X) & ", "
Next X
Clipboard.SetText Text1

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 130 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.