Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Listbox To Listbox File Moving


I am working on an application where I want to present a current file's field list in one listbox and let the user Click once to highlight it and click a command button to move it from that listbox to another one (for processing). When moved I want it to be gone from the first list and present in the second. Similarly, I have another command button that does the opposite. Can someone give me some ideas of how I actually do this?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Moving Listbox Item To Another Listbox
hi does anyone know of an easy way to move an item in a listbox to another listbox, lets say a source and target listbox and vice versa. thanks

Moving Listbox??!!
ok, how do i make an item in a listbox (List1) move into another listbox (List2) after i have selected the item and the pressed a command button. For example: In listbox1 i have an item that says "Hello" then i select it and click the command button then "Hello" moves it from listbox1 into listbox2 and is no longer in listbox1 any more. How do i do this please help!!

Thank You.

Moving From One Listbox To Another
I am currently moving items from one listbox to another the normal way with a loop. However, there can be up to 15,000 records that are moved at one time. Is there an API call that will move all records from one listbox to the other more quickly and efficiently?

Moving Items Up And Down In A Listbox
I just solved this question that I've had for a while.

Thought I'd share the code.

http://cornempire.newezone.com/resou...e/listmove.htm

Moving Items In A Listbox
Hi, I have a listbox, with the following:

[case 1]
Msg "Hello"
[case2]
msg "hello"

You can place these items on another dialog.
but, I need it to look like:

[case1]
Msg "hello"
... ---->Open a new space for more Messages when you place one.
[case2]
Msg "hello 2"

This is the code I have so far, but it isnt working.


Code:
Private Sub Command1_Click()
Dim newe As Integer


newe = Newevent.EventList(Eventnum).ListCount
Newevent.EventList(Eventnum).AddItem "<Msg>: " & Text1.Text, newe
'This bit is OK, places the message.

If Newevent.EventList(Index).Text = "..." Then
Newevent.EventList(Index).List(Newevent.EventList(Index).ListIndex) = "..."
Newevent.EventList(Index).List(Newevent.EventList(Index).ListIndex) = "<Msg>: " & Text1.Text
'Only one thing to happen for a Case
'Need it so you can have more than 1 Message under
'case 1, case 2,etc... (Move every ListItem down 1?) -Chris

Dim Position
For n = Newevent.EventList(Index).ListCount To Position + 1 Step -1
Newevent.EventList(Index).List(n) = Newevent.EventList(Index).List(n - 1)
Next
Newevent.EventList(Index).List(Position) = "..."
End If
Exit Sub

Unload events
Unload Me

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Any help would be appreciated

Chris

Moving Item From One Listbox To Another
Hey all

I am trying to move an item from one listbox to another. The first listbox has items where the RowSourceType = "Field List" and the second one is value list. This is my code:

Private Sub DisplayAllFields_DblClick(Cancel As Integer)

If ListOfFieldsSelected.RowSource = (List0.Value & "." & DisplayAllFields.Value) Then
MsgBox ("You cannot select a field more than once. Please select another field")
Else
ListOfFieldsSelected.AddItem (List0.Value & "." & DisplayAllFields.Value)
End If
End Sub

When I double click the same value in the first list again, it brings up the msgbox once but it doesn't do that once it has added another field to ListOfFieldsSelected. I would use the RemoveItem method so user can't click the field again but DisplayAllFields is set to Field List so it can't remove item unless set to "Value list". Any suggestions on this?

Any help will be greatly appreciated.

Many thanks

Rupa

Moving Items In Listbox
im trying to get items in a list box to move up and down im not sure how to do it i dont have the first clue wot to do can anyone help with the code?

Moving Listbox View
After picking an item in a Listbox, I want to return it to the top of the list. using listindex just selects an item, but doesn't return whats shown to that item. I want it to display item 0.
How do I accomplish this?
I had:

Code:
ListBox1.ListIndex = 0

but it just highlights the item, but does not show it.
i'm showing one item at a time, and scrolling to the picked item.

Listbox Moving Listindex
i have this code to select the next listindex and if its at the end start at the beggining again.

VB Code:
List1.ListIndex = (List1.ListIndex + 1) Mod List1.ListCount


my question is can anybody come up with a line like that but make it go backwards.
i know you can do if statements to check where the index is but i have been trying to figure this out and i just cant get it right.

thank you.
casey.

Moving ListBox Items
Could anyone tell me how to write a sub that allows you to click and drag an item in a listbox to a new index position within the listbox?

Ash

Moving Items In A Listbox
I have a listbox that has several items in it that i want the user to be able to move up or move down. I have two buttons, one for up the other one for down. Anyone know how to do this? Thanks!

ListBox, Moving From First Item To Second And So On
Hey, im working on a media player, the media player works great but the playlist is screwey! Im having troubble with this:

You select an item for play - 100% ok
it plays it - 100% ok
it then goes to the next item on the list - BUGGY!

it wont move to the next item and when it does, it wont update the selected item eg, it will play the next item then when thats done it will play the one before that not the next on (constant loop between two files). Please help

Moving Items In Listbox Down
This code is supposed to move items down 1 spot within the list box with the push of a cmdbutton. I got it to move one item at a time down, but ideally it should move multiple items down at the same time. Any ideas or suggestions would be greatly appreciated. Thank you.

Private Sub cmddown_Click()
Dim Temp As String, Item As Integer

Item = lstShopping.ListIndex

If (Item &gt; -1) And (Item &lt; lstShopping.ListCount - 1) Then
Temp = lstShopping.List(Item)
lstShopping.RemoveItem Item
lstShopping.AddItem Temp, Item + 1
lstShopping.ListIndex = Item + 1
End If
End Sub

Archie Kantzavelos

Moving ListBox To Typing Position.
Hey,

I have a question for you that seems to me as if it could be a hard one... I have not been able to find anything about it, mainly because I haven't got a clue as to where to look for...

I made some sort of AutoComplete feature in my program (in a RichTextBox), and it would be really nice if I could make it similar to Visual Basic's "Auto List Members" option (which is the listbox popping up with possible keywords when you type a ".")

I want a ListBox to become visible whenever the program is autocompleting a word, that lists all other possible keywords (because there are often multiple).

I want this ListBox to appear at the location of the I-beam (selection thingy).

How can I get it to move there? Is it possible to find the Top and Left location of the I-beam inside a RichTextBox somehow? I doubt it...
Can it be done otherwise?

Moving Listbox Items W/ Mouse
does anyone know how to shift listbox items around with the mouse? a good example would be winamp's playlist. the code i came up with works fine...if you move your mouse slowly. if you go fast, it'll pretty much mess up the order because the cursor jumps around when you move your mouse too quickly.


Dim HotItem1 As Integer

Private Sub List1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If HotItem1 <> List1.ListIndex Then
If HotItem1 > -1 Then
a = List1.List(HotItem1)
b = List1
List1.List(List1.ListIndex) = a
List1.List(HotItem1) = b
End If
HotItem1 = List1.ListIndex
List1_Click
End If
Else
HotItem1 = -1
End If

End Sub

Moving Text From Textbox To Listbox
I'm trying to move text from a multiline textbox [Text1] to a list box [List1] but I cant seem to get it :-( Here's what I've done so far.... The code skips some lines. Any help will be appreciated. TIA


Dim CurrStart As Integer
Dim Temp As String 'temp buffer
CurrStart = 1
Temp = Text1 'save text1 to temp
While InStr(CurrStart, Temp, vbCr)
    CurrStart = InStr(CurrStart, Temp, vbCr) 'find the newline
    List1.AddItem Left(Temp, CurrStart) 'add this line to listbox
    Temp = Right(Temp, Len(Temp) - CurrStart) 'remove this line from temp
Wend

When Moving Item Down In The Listbox The Text Disappears
Okay dont know why but the text is dissapearing when an item is moved down the list box.

Image1 displays before the move down
Image2 displays after the move down
Code is also attached. I am very confused I have been through this code througherly and I am sure there is not an error in the code.




Code:
' check: only proceed if there is a selected item
' check: last item can't be moved down
' save items text and items indexvalue
' remove item
' place item back on new position
' if you keep that item selected
' you can keep moving it by pressing cmdDown
' for arLoopCount adds the new playlist entrys from
' lstPlayList.
' list1 refreshes
' lstPlayList refreshes
Dim tempStr As String
Dim iIndex As Integer
Dim arLoopCount As Integer
List1.Clear ' Debugging orriented object to display the contents of arFilePlayList Array
If lstPlayList.SelCount = 1 Then
If lstPlayList.ListCount - 1 = lstPlayList.ListIndex Then
Exit Sub
Else
tempStr = lstPlayList.List(List1.ListIndex)
iIndex = lstPlayList.ListIndex
lstPlayList.RemoveItem lstPlayList.ListIndex
lstPlayList.AddItem tempStr, iIndex + 1
lstPlayList.Selected(iIndex + 1) = True
End If
End If
For arLoopCount = 0 To lstPlayList.ListCount
arFilePlayList(arLoopCount) = lstPlayList.List(arLoopCount)
List1.AddItem arFilePlayList(arLoopCount)
Next arLoopCount
List1.Refresh
lstPlayList.Refresh

Simple! Moving A Listbox Item For One Lsitbox To Another.
How can I move an item from

lstbox 1 ---> lstbox 2

I want the item to be removed from lstbox 1 and added to lstbox 2

Thanks for anyone who helps.

Importing Text File Into Listbox &",&" Makes New Line In Listbox?
Hi Everyone,

I am importing a text file into a list box. The below content of the text file looks like this:


Quote:





UTAODELT1 CS, I4
UTAODELT2 BDC, HoPQ
UTAODELT3 vDC, HoPQ
UTAODELT4






Once it is imported into the listbox, it looks something like this:


Quote:





UTAODELT1 CS

UTAODELT2 BDC
oPQ
UTAODELT3 vDC
oPQ
UTAODELT4







Below is the code I am using to import the data from the text file into a listbox:



VB Code:
Dim sTemp As String     Open "C:input.txt" For Input As 1        Do While Not EOF(1)            Input #1, sTemp                List1.AddItem sTemp        Loop    Close #1




My question is, how do I input the data into the listbox so that it will be in the same format as the text file?


VB for some reason is dropping to the next line when it hits a ",". How do I fix this?

Thanks for your help!!

Problem Moving Listbox Horizontal Lisbox Scroller To The Right
Hi all i put a horizantal scroller for mylistbox but unfortuntally i can not use it sicne i have long data in my listbox and i can not move the tab for the horizantal listbox since the with of is big enought that does not allow any movment to right side!! Even if i try to make my listbox width big still i face problem. Is there a way to make the size of scroller tab smaller so i can move it to the right side ? I hope some one help me here.Thanks



VB Code:
Private Declare Function ShowScrollBar Lib "user32" (ByVal hwnd As Long, ByVal wBar As Long, _ByVal bShow As Long) As LongPrivate Const SB_HORIZONTAL = 0

Fill Listbox/datalist Using Result From SQL Query, Then Use Listbox To Fill A 2nd Listbox
Need some code that will fill a listbox or a datalist with the result of a SQL query
(the result will really just be many single fields ie. EMP00001, EMP00002, EMP00003 etc. and I need these passed one by one to the listbox/datalist).


Also, when they have been instantiated, I will need the current (hightlighted) item in the listbox at the time to be used
to populate a second listbox/datalist <----- Assuming another SQL query will be necessary?


Can anyone help with the code for this?


And which is better to use for this purpose - a listbox or datalist?

Drag Listbox Entry To Another Listbox; Selected Text Drags With Mouse Cursor
Hello everybody; new member! I am trying to figure out (in VB6) how to drag a listbox item and drop it into another listbox. That's the easy part and already have basic drag and drop mechanics down pat. What's stumping me is this... I wish to have the text contained in the original listbox entry follow the mouse cursor as I am dragging to the destination textbox. This would, in effect, be a custom drag icon. I have experimented with some API direct printing but not much success (especially when mouse cursor goes over container controls; text just slides under them!). I appreciate any help anyone can give in this area. Thanks! GumbyTheCat

Auto Capitalization Of Types, Eg. Listbox Vs ListBox In VBAccess Code
I have two separate Access databases. When I am writing VB code in the first database and do a Dim lb as listbox the type is autocompleted in lowercase. In the second database it is autocompleted as ListBox. Both pieces of code seem to function just fine. Why the difference?

I've used the object browser to search for "listbox" to see if I have two kinds of listboxs due to the libraries I have loaded, but I find only one ListBox and it is in VBA.

I've also noticed similar behavior for "file' vs "File".

Daniel

Populate A Listbox Based On A Selected Item In Another Listbox
Ok...I am stumped.

I have a single form that has 3 list boxes. I have 4 public strings containing various values. Based on the selection from lstBox1, I need to populate the ListBox2 and ListBox3 list from values in the public strings. Clear as mud?? That is what I thought!

Example string variable

strLuxury = """Hand Wash"" ""Hand Wax"" ""Check Engine Fluids"" ""Detail Engine Compartment"" ""Detail Under Carriage"" ""Fragrance"" ""Shampoo Carpets"" ""Shampoo Upholstery"" ""Scotchgard"""

ListBox1 contains the following:

Standard
Deluxe
Executive
Luxury

ListBox2 is empty, but is contained in a frame indicating Exterior Options
ListBox3 is empty, but is contained in a frame indicating Interior Options

If Luxury is selected in ListBox1, then ListBox2 should contain
Hand Wash
Hand Wax
Check Engine Fluids
Detail Engine Compartment
Detain Under Carriage

And ListBox3 should contain
Fragrance
Shampoo Carpets
Shampoo Upholstery
Scotchgard

If Fragrance is present in ListBox3, a seperate dropdown box should appear allowing selection of the appropriate scent.

Yes, this is a homework assingment.

Thank you in advance for your help!
Mark

Pass Value From Listbox To Textbox When Single Click On Value In Listbox
Hi there,

I have a form with a listbox and a textbox.

The listbox is populated by an sql query.


When the user single clicks (highlights) an item in the listbox, I want the value they have hightlighted/selected to be passed and stored in the textbox.


Anyone know how I can do this?


Thanks

Transfering Item From One Listbox To Anotehr Listbox On Click
Hi all i got 2 listbox . I want to be able to click on my first listbox items and once i click on them it transfers to the second listbox. Could any one tell me how that can be done.Thanks

Listbox: How To Know Last Added Item's Index, When The Listbox Is Sorted?
When sorted property of a listbox is set to True, each new item added won't be at the end of the list, it will be automatically placed in the correct index, according to text order, is there a way to know which is the index of that item (last item added)? Looping to find it would be horrendous, I just need the index to mark that item selected.

Copying The Items From My Listbox To Another Listbox Not In My Program?[UNSOLVED]
Hey!
As you can see I want to copy the items from a listbox in my form into another program(wich i didnt made it, but the program is made with VB)
How can I do this?
P.S : There are two listboxes in the other app!

Thank you!!

ListBox With Multiline**SOLVED WITH LISTBOX HORIZONTAL SCROLLBAR***
Hi
when i type a text into Text1 and press command1, it adds text1.text to list1

what can I do if the text in text1 is bigger than the space in List1

:/

thanks

I Want To Display Data In Two Columns In Listbox And Add Items In Listbox How Is It Possible In Vb 6.0
i want to display data in two columns in listbox and add items in listbox how is it possible in vb 6.0 ...?

I Want To Display Data In Two Columns In Listbox And Add Items In Listbox How Is It Possible
i want to display data in two columns in listbox and add items in listbox how is it possible ...?

ListBox Default Save And Use ListBox With Control Array
Hello all, Here is my questions:
1. I am using Listbox and what I want to do is when I click an item(i.e. "50 white") in the listbox, the corresponding control arrays will showl a list of values. I am to the point when I click "50 white", the control arrays will show "50 White" but I would like to have it show an array of values which I can assign. (Please refer to the picture I attach).
2. I would like to let the user to define the array to show in the control arrays. This means: When the program is started, the user will first click one item in the listbox (i.e. 50 white). Then the user will be able to type some value(would also like to do a numeric value validation check here) and then click "save" button. Once "save" button is clicked, the values user typed in will be saved to an array and next time when "50 white" is clicked the corresponding value is shown in the textboxes. Another thing is I would like to have the program to remember what the user typed. This means, even the user close the program, the program will remember what the user typed and next time when the program is started it should show what the user typed in last time.

Here is the code I have:
Code:

Private Sub cmdClose_Click(Index As Integer)
frmVariables.Hide
End Sub

Private Sub cmdReset_Click()
Dim num1 As Integer
For num1 = 0 To 6
textField1a(num1).Text = ""
Next
End Sub

Private Sub Form_Load()

Dim vara() As Double
Dim varb() As Double
listField.AddItem "50"

listField.AddItem "100"

listField.AddItem "150"

listField.AddItem "50 white"

listField.AddItem "100 white"

listField.AddItem "150 white"




End Sub

Private Sub listField_Click()


Dim num1 As Integer
For num1 = 0 To 6
textField1a(num1).Text = AddNames(listField.List(listField.ListIndex))

Next
End Sub

Private Function AddNames(gString As String) As String
    AddNames = gString
End Function

Dragdrop Moving Wrong Item In Listbox(aborted Dragdrop Idea)
I am using dragdrop in a list box(checkbox style) to move items around but sometimes it picks up the item below the one I selected instead of the one I clicked on. ANy ideas? heres the code I'm using

Code:

Private Sub lstFields_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Button And vbLeftButton) = vbLeftButton Then
nDragIndex = Y Me.TextHeight("Xyz")
If nDragIndex >= 0 And nDragIndex < lstFields.ListCount Then
blnDraging = True
End If
End If
End Sub

Private Sub lstFields_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim nIndex As Integer
Dim sItem As String

If (Button And vbLeftButton) = vbLeftButton Then
If blnDraging = True Then
nIndex = Y Me.TextHeight("Xyz")
If nIndex > lstFields.ListCount - 1 Then
nIndex = lstFields.ListCount
ElseIf nIndex < 0 Then
nIndex = 0
End If
If nIndex <> nDragIndex Then
sItem = lstFields.List(nDragIndex)
lstFields.RemoveItem nDragIndex
lstFields.AddItem sItem, nIndex
End If
End If
blnDraging = False
End If
End Sub


This is my first post with code in it so I hope I did it right, sorry if I didn't.

Sunflower Queen

How To Add A Listbox Item To A Listbox On Another Form Within The Project.
What is the best method to take an item selected in a listbox and add it to another listbox on a different form within the same app?

Listbox Propertys {suggestions For Listbox Replacement}
i am making a plain listbox usercontrol but want to add a lot of propertys.

any ideas for some subs/functions i could add ?

thanks.

Passing A Value From Listbox To Textbox When Listbox Has 2 Values :( ?
I have a listbox, that I want to pass a .text value from to a textbox.
Problem is, The listbox is holding two values (as passed by 2 fields from a recordset) like this...


Code:
For i = 0 To rstCust.RecordCount - 1

lstCust.AddItem rstCust.Fields(0).Value & " " & rstCust.Fields(1).Value
rstCust.MoveNext

Next
Which displays the list like this:

001 Smith
002 Jones
003 Black

etc.


When I click on the listbox, I want the value I click on to go to a textbox called txtCustID, but I dont want to send both values to it.

I only want to send the rstCust.Fields(0).Value to the textbox (which would be 001, 002, 003 etc. but not the name).


Can anyone help me do this?

Thanks

Send All The Contents Form 1 Listbox To Another Listbox
hello everybody,

i got a new problem. i want to move all the items from list1 to list2 in one single click.

Does VB6 Have An Equivelent To C++'s SetTopIndex For A ListBox, So I Can Always See The Last String In The Listbox?
Hi,
I'm adding hundreds of strings to a listbox and I want the last added
string to be visable to the user. In C++ there is a function
SetTopIndex which does this, how do you do it in VB?

Thanks in advance for any help given.
Pieter

Passing A Value From Listbox To Textbox When Listbox Has 2 Values :( ?
I have a listbox, that I want to pass a .text value from to a textbox.
Problem is, The listbox is holding two values (as passed by 2 fields from a recordset) like this...

Code:
For i = 0 To rstCust.RecordCount - 1

lstCust.AddItem rstCust.Fields(0).Value & " " & rstCust.Fields(1).Value
rstCust.MoveNext

Next


Which displays the list like this:

001 Smith
002 Jones
003 Black

etc.


When I click on the listbox, I want the value I click on to go to a textbox called txtCustID, but I dont want to send both values to it.

I only want to send the rstCust.Fields(0).Value to the textbox (which would be 001, 002, 003 etc. but not the name).


Can anyone help me do this?

Thanks

Pass Value From Listbox To Textbox When Click On Value In Listbox
Hi there,

I have a form with a listbox and a textbox.

The listbox is populated by an sql query.


When the user single clicks (highlights) an item in the listbox, I want the value they have hightlighted/selected to be passed and stored in the textbox.


Anyone know how I can do this?


Thanks

.: Please Help: Copy Selected Item(s) From A ListBox To The Other ListBox..
Hi everyone!

I'm having problem with copying file to another Listbox, please help..
So, in this case, I have two ListBoxes where the 1st ListBox holds several items..
I need to copy the selected item to the other listbox 'without' a repetition, I mean.. the same item won't copied anymore..
When the user tries to copy the item which have already been in the ListBox2, then a messagebox will pop up to warn the user of the existing item.... So, how should I do that??


Thanks a lot

Transfer Listbox To Listbox Via Winsock
hey there..
i need help with my problem, i've a Server with a list box.
So i want that the server sends all entrys from the server listbox to all client listboxs, thats everything, but i don't know how v.v

so please help me how the server sends the content and the client recives it and add its to the list box ... thats everything i want to know.

Populate Listbox Depending On What's In Another Listbox
i am using MS Access v6

i need to query a table, but only where a field in the table equals a field in a listbox.column(2)

I have 2 listboxes, the first has a list of parent categories, the second has a list of child categories. i need to click the parent cat listbox to populate it's children in the 2nd listbox, but am having issues with the Row Source for the child cat listbox.

i wrote this for the child listbox:


Code:
SELECT expense_categories.expense_cat_name, expense_categories.expense_cat_desc, expense_categories.expense_cat_id, expense_categories.expense_cat_parent_id
FROM expense_categories
WHERE expense_categories.expense_cat_parent_id=Me.ExpenseCatParent_list.Column(2);
and put it in "Row Source"

but a box keeps coming up saying "undefined function 'Me.ExpenseCatParent_list' in expression"

can anyone provide an idea on how i can achieve what i need?

thanks in advance,
-mondego

Transfer Listbox Contents To Another Listbox??
is it easy to transfer items in a listbox to another listbox in another form?

i cant save all its contents to a variable can i?

anyone have any ideas?>

Drag From ListBox And Drop Into Another ListBox
Am having a complete mental block here on drag-and-drop.

Trying to copy selected items from a ListBox that has it's .MultiSelect property set to 2-Extended into another ListBox.

When more than one item is selected, I can only get the last item to drop into the second ListBox.

Any help at all appreciated.

Copying Listbox Content To Another ListBox???
Hi,
i need some help over here. i have 2 listboxes, the user can add data to the first and then he can push the button, which copies the data from the first listbox to the second. what's the simpliest way to do that?

Adding An Item From One Listbox To Another Listbox
I have several forms, one with a listbox that displays the selected records of a field from a database. I select(click) one of those records and want to have another particular field from that record display in another listbox on another form. So far it works with this code, but pulls all the records from the first listbox.
To be more specific, the database has populations and zip codes, etc. The field for population is called pop2001 and the zip codes is Zip. The listbox with the selected records displays zipcodes and I want to select one of those zipcodes and have it's population display in the other forms listbox, but it displays all of them. Can anybody help?


Code:
Private Sub Form_Load()

PopRecSet.MoveFirst
Do Until PopRecSet.EOF
frmpopfinal.lstpopfinal.AddItem PopRecSet![pop2001]
PopRecSet.MoveNext
Loop


End Sub

Listbox To Listbox - Adding Index
I have on my form two listboxes: list1 and list2 and a button cmdGo

The item data placed in list one is placed there at runtime so therefore with no index values. When I press the go button I want each item from the first list box to go into the second list box BUT as the items go in I want to set index values because I need to form a string at a later stage and will need to keep adding until all items are added (until index is reached)

This is my code so far:

Private Sub Form_Load()
List1.AddItem "David"
List1.AddItem "Paul"
List1.AddItem "Sarah"
End Sub

Private Sub CmdGo_Click()
Dim x As Integer
Dim i As Integer
With List1
For x = List1.ListCount - 1 To 0 Step -1
List2.AddItem List1.Text
List2.ItemData(List2.NewIndex) = i
Next x
End With
End Sub


As you can see all is not well with the code and I am starting to pull my hair out - Any ideas?

How Do I Copy Numbers From One ListBox To A ListBox Beside It?
How do I copy numbers from one ListBox to a ListBox beside it?

Copyright © 2005-08 www.BigResource.com, All rights reserved