| | |
Listbox Help
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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
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
purpleGERBIL
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.
![]() |
Similar Threads
- Integer to string then 2 listbox (Visual Basic 4 / 5 / 6)
- link text boxes with listbox (VB.NET)
- Listbox with Columns (Visual Basic 4 / 5 / 6)
- Adding Totals from Listbox DB (DAO) (Visual Basic 4 / 5 / 6)
- Populating & Retrieving Data in a listbox : ASP.NET (w/ VB.NET) (ASP.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Network LAN Connection to be Enabled/Disabled
- Next Thread: can i use remote administrator through VBA?
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






