VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Copy a listbox to clipboard

by Joey Schoblaska (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

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

Rate Copy a listbox to clipboard

'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

Download this snippet    Add to My Saved Code

Copy a listbox to clipboard Comments

No comments have been posted about Copy a listbox to clipboard. Why not be the first to post a comment about Copy a listbox to clipboard.

Post your comment

Subject:
Message:
0/1000 characters