943,946 Members | Top Members by Rank

Ad:
Jul 17th, 2006
0

Listbox Help

Expand Post »
Hi,

A program I am writing has the user entering values into textboxes then clicking an 'Add' button. Once clicked one of the textbox values appears in a list box.

e.g Job Number, Data Filename, Unique Code

The Unique code is displayed in a listbox.
All three values are stored within arrays.

When the user has finished entering details they can save the list. This is to a csv style format.

My question is: Is there a property that can be used to store the array position so when the user saves the info from the listbox, all the related fields are saved as well.

Hope this makes sence.

I have tried the .Tag property but it looks like that only stores one value for the whole listbox.


pG
Similar Threads
Reputation Points: 24
Solved Threads: 6
Junior Poster in Training
purplegerbil is offline Offline
78 posts
since Apr 2005
Jul 17th, 2006
0

Re: Listbox Help

There is not one, but a solution is to have another listbox, that's .visible property is set to false, and then have it keep track of whatever value you need it to, to coorespond to the item in the first listbox... I think you want to do though, is use the listindex property of the listbox in the array.... for example print #1, array1(list1.listindex) & "," & array2(list1.listindex) & "," & array3(list1.listindex). This works, because a listbox's first item is 0, and so is an arrays. So, when you populate the listbox, it's indices (slots of the array) line up with the arrays.... with me?
Last edited by Comatose; Jul 17th, 2006 at 9:08 am.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Pass variables through network connection
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: can i use remote administrator through VBA?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC