Advertisement
7_2009-2012 Miscellaneous #218145

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

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
'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

Upload
Upload
Commenti originali (3)
Recuperato da Wayback Machine