Ann_BBO
08-08-2007, 08:50 PM
After Analysis the data, then i want to put all Listbox1.list into the ListBox2.list. Also, it will delete the list in listbox1 after analysis.
For delete the list in listbox1, i had success to do it. But i cannot transfer the listbox1.list into listbox2.list
' Try to put the List of ListBox1 to the ListBox2
With ListBox2
For x = 0 To ListBox1.ListCount - 1
.List = ListBox1.List(x)
Next x
End With
' Delete the filepath in the listbox1
With ListBox1
For k = .ListCount - 1 To 0 Step -1
.RemoveItem k
Next k
End With
The original filelist in listbox1.
' Display full path and name of the files
For i = LBound(sFiles) To UBound(sFiles)
sFileShort = Right(sFiles(i), Len(sFiles(i)))
With Me.ListBox1
.MultiSelect = 2
.AddItem sFileShort
.List(.ListCount - 1, 1) = sFiles(i)
End With
Next
Thanks
For delete the list in listbox1, i had success to do it. But i cannot transfer the listbox1.list into listbox2.list
' Try to put the List of ListBox1 to the ListBox2
With ListBox2
For x = 0 To ListBox1.ListCount - 1
.List = ListBox1.List(x)
Next x
End With
' Delete the filepath in the listbox1
With ListBox1
For k = .ListCount - 1 To 0 Step -1
.RemoveItem k
Next k
End With
The original filelist in listbox1.
' Display full path and name of the files
For i = LBound(sFiles) To UBound(sFiles)
sFileShort = Right(sFiles(i), Len(sFiles(i)))
With Me.ListBox1
.MultiSelect = 2
.AddItem sFileShort
.List(.ListCount - 1, 1) = sFiles(i)
End With
Next
Thanks