Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating text box with listbox 1

Status
Not open for further replies.

r3b00t

Technical User
Aug 13, 2002
45
0
0
GB
Hi

Ive got 3 textboxes which, when a button is clicked, will add an item to a listbox, this item consists of the data from the 3 textboxes seperated by space(20) eg 09/31/2002 1329654321 12.30pm

What i want, is for when a user double-clicks an item for the 132965432 part of the listbox item to be copied to the clipboard.

Is this possible and if so, could someone please help?!?

Thanx alot in advance guys!

Regards

r3b00t
 
Have a look at the "Split" function in the online help, then use the code you already have from your previous question to copy to the clipboard.

Hope this helps

Daren
Must think of a witty signature
 
Looks easy! Try this:
Code:
Private Sub List1_DblClick()
Dim myNum As Long
Dim myAry() As String
Clipboard.Clear
myAry = Split(List1.List(List1.ListIndex), Space(20))
Clipboard.SetText myAry(1) ' Gets second item in list
End Sub
Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Johnwm you're a genius!

Thanx alot AGAIN!

Regards

r3b00t
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top