|
-
Sep 22nd, 2007, 05:22 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] How to sent listbox items to other items?
I would like to know, how I can sent the listbox items from one listbox ("LIST1") to another listbox ("LIST2") and clear the selected items from list1?
-
Sep 22nd, 2007, 05:46 AM
#2
Fanatic Member
Re: How to sent listbox items to other items?
Code:
Private Sub Command1_Click()
For i = 0 To List1.ListCount - 1
List2.AddItem List1.List(i)
Next i
End Sub
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
-
Sep 22nd, 2007, 05:51 AM
#3
Fanatic Member
Re: How to sent listbox items to other items?
for removing selected items
Code:
Sub ListBoxRemSel(lst As ListBox)
Do Until lst.SelCount = 0
If lst.Selected(a) Then lst.RemoveItem a: a = a - 1
a = a + 1
Loop
End Sub
Private Sub Command1_Click()
Call ListBoxRemSel(List1)
End Sub
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
-
Sep 22nd, 2007, 06:10 AM
#4
Thread Starter
Frenzied Member
Re: How to sent listbox items to other items?
Here is the code I have corrected
Code:
Private Sub List1_DblClick()
On Error Resume Next
List2.AddItem List1.Text
List1.RemoveItem List1.ListIndex
End Sub
Private Sub List2_DblClick()
On Error Resume Next
List1.AddItem List2.Text
List2.RemoveItem List2.ListIndex
End Sub
-
Sep 25th, 2007, 05:09 AM
#5
Fanatic Member
Re: [RESOLVED] How to sent listbox items to other items?
U said that u want to send items to list2. U did not say that i want it when i doubleclick it. Anyway ur prob is solved.
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|